PhysicsTraceBuilder IgnoreKeyframed()

robot_2Generated
code_blocksInput

Description

The IgnoreKeyframed method of the PhysicsTraceBuilder class is used to configure a physics trace to ignore keyframed objects. Keyframed objects are those that are animated or moved by keyframes, typically in a non-physical manner, and this method allows you to exclude them from collision detection during the trace.

Usage

To use the IgnoreKeyframed method, call it on an instance of PhysicsTraceBuilder when setting up a physics trace. This method modifies the trace configuration to exclude keyframed objects from being considered in the trace results.

Example

// Example of using IgnoreKeyframed in a physics trace
PhysicsTraceBuilder traceBuilder = new PhysicsTraceBuilder();
traceBuilder.IgnoreKeyframed();

// Configure other trace parameters
traceBuilder.FromTo(startPosition, endPosition);
traceBuilder.Radius(0.5f);

// Run the trace
PhysicsTraceResult result = traceBuilder.Run();

// Check if the trace hit anything
if (result.Hit)
{
    // Handle the hit
}