Description
The WithAllTags
method in the PhysicsTraceBuilder
class allows you to specify a set of tags that must all be present on an object for it to be considered in the physics trace. This method is useful when you want to filter trace results to only include objects that match all specified tags.
Usage
To use the WithAllTags
method, call it on an instance of PhysicsTraceBuilder
and pass an array of strings representing the tags you want to include in the trace. The method returns the same PhysicsTraceBuilder
instance, allowing for method chaining.
Example
// Example usage of WithAllTags method
PhysicsTraceBuilder traceBuilder = new PhysicsTraceBuilder();
traceBuilder = traceBuilder.WithAllTags(new string[] { "tag1", "tag2", "tag3" });
// Continue building the trace
traceBuilder = traceBuilder.FromTo(startPosition, endPosition);
// Run the trace
PhysicsTraceResult result = traceBuilder.Run();