SceneTrace Radius( float radius )

book_4_sparkGenerated
code_blocksInput

Description

The Radius method of the SceneTrace struct is used to configure the trace to operate as a sphere with a specified radius. This method is part of the Shapes group and is marked with the Title attribute as "Sphere". It modifies the trace to consider a spherical volume when performing collision detection or other spatial queries.

Usage

To use the Radius method, you need to have an instance of SceneTrace. Call the method with a single parameter, radius, which is a float representing the radius of the sphere. This will configure the trace to use a sphere of the specified radius for its operations.

Example

// Example of using the Radius method
SceneTrace trace = new SceneTrace();
float sphereRadius = 5.0f;
trace = trace.Radius(sphereRadius);

// Now the trace is configured to use a sphere with a radius of 5 units.