Description
The IgnoreDynamic
method in the SceneTrace
struct is used to configure a trace operation to ignore dynamic objects. This means that when the trace is executed, it will not register hits with any objects that are considered dynamic within the scene. This can be useful for scenarios where you want to focus on static or other types of objects without interference from dynamic entities.
Usage
To use the IgnoreDynamic
method, you typically chain it with other trace configuration methods on a SceneTrace
instance. This method does not take any parameters and returns the modified SceneTrace
instance, allowing for fluent configuration.
Example
// Example of using IgnoreDynamic in a SceneTrace
SceneTrace trace = new SceneTrace();
trace = trace.IgnoreDynamic();
// Further configuration and execution of the trace
trace = trace.FromTo(startPosition, endPosition);
SceneTraceResult result = trace.Run();
// Process the result
if (result.Hit)
{
// Handle hit
}