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

robot_2Generated
code_blocksInput

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();