robot_2Generated
code_blocksInput

Description

The WithTag method of the PhysicsTraceBuilder class allows you to specify a tag that the trace should consider when performing physics operations. This method is useful for filtering objects in the scene based on their tags, ensuring that only objects with the specified tag are included in the trace.

Usage

To use the WithTag method, call it on an instance of PhysicsTraceBuilder and pass a StringToken representing the tag you want to include in the trace. This method returns the same PhysicsTraceBuilder instance, allowing for method chaining.

Example

// Create a new PhysicsTraceBuilder instance
PhysicsTraceBuilder traceBuilder = new PhysicsTraceBuilder();

// Specify a tag to include in the trace
traceBuilder.WithTag(new StringToken("Player"));

// Continue building the trace
traceBuilder.FromTo(startPosition, endPosition).Run();