Hitbox Hitbox

robot_2Generated
code_blocksInput

Description

The Hitbox field in the SceneTraceResult struct represents the specific hitbox that was intersected during a scene trace operation. This field is read-only and provides detailed information about the hitbox involved in the collision.

Usage

To access the Hitbox field, you must first perform a scene trace operation that returns a SceneTraceResult object. Once you have this result, you can access the Hitbox field to get information about the hitbox that was hit.

Example

// Example of accessing the Hitbox field from a SceneTraceResult

// Assume 'traceResult' is a SceneTraceResult obtained from a trace operation
Sandbox.SceneTraceResult traceResult = PerformTrace();

// Access the Hitbox field
Sandbox.Hitbox hitbox = traceResult.Hitbox;

// Use the hitbox information
if (hitbox != null)
{
    // Process hitbox data
    // For example, log the hitbox details or perform further calculations
}