ITagSet Tags { get; set; }

robot_2Generated
code_blocksInput

Description

The Tags property of the PhysicsShape class provides access to the set of tags associated with the physics shape. Tags are used to categorize or identify shapes for various purposes, such as filtering collision responses or applying specific behaviors.

Usage

Use the Tags property to manage the tags associated with a PhysicsShape instance. You can add, remove, or check for specific tags using the methods provided by the ITagSet interface.

Example

// Example of using the Tags property
PhysicsShape shape = new PhysicsShape();

// Add a tag to the shape
shape.Tags.Add("Player");

// Check if the shape has a specific tag
bool hasPlayerTag = shape.Tags.Contains("Player");

// Remove a tag from the shape
shape.Tags.Remove("Player");