TagSet BodyCollisionTags { get; set; }

book_4_sparkGenerated
code_blocksInput

Description

The BodyCollisionTags property of the PlayerController class is a TagSet that defines the set of tags used for collision detection with the player's body. This property allows you to specify which tags should be considered when determining collisions involving the player's body.

Usage

Use the BodyCollisionTags property to manage and query the tags associated with the player's body for collision purposes. This can be useful for customizing collision behavior based on specific tags.

Example

// Example of setting BodyCollisionTags
PlayerController playerController = new PlayerController();
playerController.BodyCollisionTags.Add("Player");
playerController.BodyCollisionTags.Add("NPC");

// Check if a specific tag is present
bool hasPlayerTag = playerController.BodyCollisionTags.Contains("Player");

// Remove a tag
playerController.BodyCollisionTags.Remove("NPC");