Description
The StartedSolid
field of the SceneTraceResult
struct indicates whether the trace operation began within a solid object. This boolean value 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 operation started inside a solid object. This can be particularly useful in scenarios where you need to handle cases where the trace begins in a collision state, such as when performing physics calculations or collision detection.
Example
// Example usage of 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 adjusting the trace start position or handling a collision state
// Example: Log a warning or adjust the trace logic
Log.Warning("Trace started inside a solid object.");
}