bool StartedSolid

book_4_sparkGenerated
code_blocksInput

Description

The StartedSolid field is a boolean value that indicates whether a trace operation began within a solid object. This field is part of the SceneTraceResult structure, which provides detailed information about the result of a trace operation in a scene.

Usage

Use the StartedSolid field to determine if the initial position of a trace was inside a solid object. This can be useful for collision detection and handling scenarios where an object might be embedded within another at the start of a trace.

Example

// Example of using the StartedSolid field
SceneTraceResult traceResult = SceneTraceResult.From(scene, trace);

if (traceResult.StartedSolid)
{
    // Handle the case where the trace started inside a solid object
    // This might involve repositioning the object or logging a warning
    HandleStartedInSolid(traceResult);
}

void HandleStartedInSolid(SceneTraceResult result)
{
    // Custom logic to handle the scenario
    // For example, reposition the object or log a message
}