string GroupName { get; set; }

book_4_sparkGenerated
code_blocksInput

Description

The GroupName property of the PhysicsBody class represents the name assigned to this physics body within its group. This property is useful for identifying and managing physics bodies that are part of a larger group or system.

Usage

Use the GroupName property to get or set the name of a physics body within its group. This can be particularly useful when you need to manage or reference specific bodies within a group by name.

Example

// Example of setting the GroupName property
PhysicsBody myPhysicsBody = new PhysicsBody();
myPhysicsBody.GroupName = "PlayerCharacter";

// Example of getting the GroupName property
string groupName = myPhysicsBody.GroupName;
Console.WriteLine($"The group name is: {groupName}");