Description
The IgnoreKeyframed
method in the SceneTrace
struct is used to configure a trace operation to ignore keyframed objects. Keyframed objects are typically those that are animated or have their transformations driven by keyframes, and this method ensures that such objects are not considered during the trace operation.
Usage
To use the IgnoreKeyframed
method, you should call it on an instance of SceneTrace
when setting up your trace. This method modifies the trace configuration to exclude keyframed objects from being hit. This is useful in scenarios where you want to perform collision detection or raycasting without considering objects that are animated or controlled by keyframes.
Example
// Example of using IgnoreKeyframed in a SceneTrace
SceneTrace trace = new SceneTrace();
trace = trace.IgnoreKeyframed();
// Continue setting up the trace as needed
trace = trace.FromTo(startPosition, endPosition);
trace = trace.Radius(1.0f);
// Run the trace
SceneTraceResult result = trace.Run();
// Check if the trace hit anything
if (result.Hit)
{
// Handle the hit
}