Description
The Surface
field in the PhysicsTraceResult
struct represents the physical properties of the surface that was hit during a physics trace operation. This field provides detailed information about the material characteristics of the surface, which can be used to determine how the surface interacts with other objects, such as friction, restitution, and other material-specific properties.
Usage
To access the Surface
field, you need to perform a physics trace operation and obtain a PhysicsTraceResult
instance. Once you have the result, you can access the Surface
field to get information about the surface that was hit.
Example usage:
PhysicsTraceResult traceResult = PerformPhysicsTrace();
if (traceResult.Hit)
{
Surface hitSurface = traceResult.Surface;
// Use hitSurface to determine material properties
}
Example
PhysicsTraceResult traceResult = PerformPhysicsTrace();
if (traceResult.Hit)
{
Surface hitSurface = traceResult.Surface;
// Use hitSurface to determine material properties
}