Description
The WithCollisionRules
method in the SceneTrace
struct allows you to specify collision rules based on tags. This method is useful when you want to perform a trace that respects the collision settings of objects with specific tags. You can also specify whether the trace should consider the objects as triggers.
Usage
To use the WithCollisionRules
method, you need to provide a tag and a boolean indicating if the trace should treat the objects as triggers. This method returns a SceneTrace
object, allowing you to chain further trace configuration methods.
Example
// Example usage of WithCollisionRules
SceneTrace trace = new SceneTrace();
trace = trace.WithCollisionRules("Player", true);
// Now you can run the trace with the specified collision rules
SceneTraceResult result = trace.Run();