The Body
field of the SceneTraceResult
struct represents the physics object that was hit during a trace operation, if any. It is of type PhysicsBody
and provides information about the physical body involved in the collision.
The Body
field of the SceneTraceResult
struct represents the physics object that was hit during a trace operation, if any. It is of type PhysicsBody
and provides information about the physical body involved in the collision.
Use the Body
field to access the physics object that was hit during a trace. This can be useful for determining the physical properties or behaviors of the object involved in the collision.
// Example of using the Body field in a trace result SceneTraceResult traceResult = Scene.Trace(...); if (traceResult.Hit) { PhysicsBody hitBody = traceResult.Body; if (hitBody != null) { // Perform operations with the hit physics body // For example, apply a force or retrieve its properties } }