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 performing collision detection or ray tracing 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();
SceneTrace cylinderTrace = trace.Cylinder(5.0f, 2.0f);

// Configure the trace further if needed
// cylinderTrace = cylinderTrace.WithTag("Player");

// Run the trace
SceneTraceResult result = cylinderTrace.Run();

// Check if the trace hit something
if (result.Hit)
{
    // Handle the hit
    var hitPosition = result.Position;
    // Do something with the hit position
}