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

robot_2Generated
code_blocksInput

Description

The Cylinder method in the SceneTrace class is used to cast a cylinder shape in the scene. This method is useful for detecting collisions or intersections with a cylindrical volume.

Usage

To use the Cylinder method, you need to specify the height and radius of the cylinder you want to cast. This method returns a SceneTrace object, which can be further configured or executed to perform the trace.

Example

// Example of using the Cylinder method
SceneTrace trace = new SceneTrace();
float height = 10.0f;
float radius = 2.0f;
SceneTrace cylinderTrace = trace.Cylinder(height, radius);

// Configure additional trace parameters if needed
// Run the trace
SceneTraceResult result = cylinderTrace.Run();

// Check if the trace hit something
if (result.Hit)
{
    // Handle the hit result
    Vector3 hitPosition = result.Position;
    // Additional logic here
}