Description
The PhysicsTrace
field in the SceneTrace
struct is an instance of PhysicsTraceBuilder
. It is used to configure and execute physics-based trace operations within a scene. This field allows you to set up various parameters for tracing, such as the shape, size, and filters, and then execute the trace to detect collisions or interactions with other objects in the scene.
Usage
To use the PhysicsTrace
field, you typically start by configuring the trace parameters using the methods provided by PhysicsTraceBuilder
. Once configured, you can execute the trace to determine interactions with other objects in the scene. This is useful for detecting collisions, line of sight checks, or any other physics-based queries.
Example
// Example of using PhysicsTrace in SceneTrace
SceneTrace trace = new SceneTrace();
trace.PhysicsTrace
.FromTo(startPosition, endPosition)
.Size(new Vector3(1, 1, 1))
.Run();