Represents the number of shapes that are associated with this PhysicsBody
instance. Each PhysicsBody
can have multiple shapes, and this property provides a count of those shapes.
Represents the number of shapes that are associated with this PhysicsBody
instance. Each PhysicsBody
can have multiple shapes, and this property provides a count of those shapes.
Use the ShapeCount
property to determine how many shapes are currently attached to a PhysicsBody
. This can be useful for debugging or when you need to iterate over all shapes of a body.
// Example of accessing the ShapeCount property PhysicsBody body = new PhysicsBody(); int numberOfShapes = body.ShapeCount; // Output the number of shapes // Note: Avoid using Console.WriteLine in Sandbox // Instead, use a logging system or in-game UI to display this information Log.Info($"Number of shapes: {numberOfShapes}");