Description
The FromTo
method in the PhysicsTraceBuilder
class is used to define a trace from one point to another in 3D space. This method sets the start and end points of the trace, which is useful for performing physics calculations such as raycasting or collision detection.
Usage
To use the FromTo
method, you need to provide two Vector3
references representing the start and end points of the trace. This method returns a PhysicsTraceBuilder
object, allowing for method chaining to further configure the trace.
Example
// Example usage of the FromTo method
Vector3 startPoint = new Vector3(0, 0, 0);
Vector3 endPoint = new Vector3(10, 0, 0);
PhysicsTraceBuilder traceBuilder = new PhysicsTraceBuilder();
traceBuilder.FromTo(ref startPoint, ref endPoint);
// Further configuration and execution of the trace
PhysicsTraceResult result = traceBuilder.Run();