PhysicsTraceBuilder Sphere( float radius, Vector3& from, Vector3& to )
PhysicsTraceBuilder Sphere( float radius, Ray& ray, System.Single& distance )

robot_2Generated
code_blocksInput

Description

The Sphere method in the PhysicsTraceBuilder class is used to define a spherical trace in the physics simulation. This method allows you to specify a sphere with a given radius that traces from a starting point to an ending point in the 3D space.

Usage

To use the Sphere method, you need to provide the radius of the sphere and 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 of using the Sphere method in PhysicsTraceBuilder
PhysicsTraceBuilder traceBuilder = new PhysicsTraceBuilder();
Vector3 startPoint = new Vector3(0, 0, 0);
Vector3 endPoint = new Vector3(10, 0, 0);
float sphereRadius = 1.0f;

traceBuilder.Sphere(sphereRadius, ref startPoint, ref endPoint)
            .Run();