bool StartedSolid

book_4_sparkGenerated
code_blocksInput

Description

The StartedSolid field of the PhysicsTraceResult struct indicates whether the trace operation began within a solid object. This boolean field is useful for determining if the initial position of the trace was already inside a collision volume, which can affect the results of the trace.

Usage

Use the StartedSolid field to check if a trace started inside a solid object. This can be particularly useful in scenarios where you need to handle cases differently if the trace begins within a solid, such as when performing collision detection or physics simulations.

Example

// Example usage of PhysicsTraceResult.StartedSolid
PhysicsTraceResult traceResult = PerformTrace();

if (traceResult.StartedSolid)
{
    // Handle the case where the trace started inside a solid object
    // This might involve adjusting the trace start position or logging a warning
    HandleStartedInSolid(traceResult);
}
else
{
    // Proceed with normal trace handling
    ProcessTraceResult(traceResult);
}