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.
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.
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 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 }