Description
The Cylinder
method in the PhysicsTraceBuilder
class is used to define a cylindrical shape for a physics trace. This method allows you to specify the dimensions of the cylinder by providing its height and radius. The trace will then consider this cylindrical shape when performing collision detection or other physics-related operations.
Usage
To use the Cylinder
method, you need to have an instance of PhysicsTraceBuilder
. Call the Cylinder
method on this instance, passing the desired height and radius of the cylinder as parameters. This method returns the same PhysicsTraceBuilder
instance, allowing for method chaining.
Example
// Create a new PhysicsTraceBuilder instance
PhysicsTraceBuilder traceBuilder = new PhysicsTraceBuilder();
// Define a cylinder with a height of 10 units and a radius of 2 units
traceBuilder.Cylinder(10.0f, 2.0f);
// Continue building the trace with additional configurations
traceBuilder.FromTo(startPosition, endPosition).Run();