The WithoutTags
method of the SceneTrace
struct allows you to filter out entities that possess any of the specified tags. This method is useful when you want to perform a trace in the scene but exclude certain entities based on their tags.
The WithoutTags
method of the SceneTrace
struct allows you to filter out entities that possess any of the specified tags. This method is useful when you want to perform a trace in the scene but exclude certain entities based on their tags.
To use the WithoutTags
method, call it on an instance of SceneTrace
and pass an array of strings representing the tags you want to exclude. The method returns a modified SceneTrace
instance that will ignore entities with any of the specified tags during the trace operation.
// Example usage of SceneTrace.WithoutTags SceneTrace trace = new SceneTrace(); trace = trace.WithoutTags(new string[] { "Enemy", "Obstacle" }); // Run the trace SceneTraceResult result = trace.Run(); // Process the result if (result.Hit) { // Handle the hit }