SceneTrace WithCollisionRules( string tag, bool asTrigger )
SceneTrace WithCollisionRules( IEnumerable<string> tags, bool asTrigger )

robot_2Generated
code_blocksInput

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 call it on an instance of SceneTrace. Provide the tag of the objects whose collision rules you want to use, and a boolean indicating whether to treat the objects as triggers.

Example

// Example of using 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();