bool EnableSolidCollisions { get; set; }

robot_2Generated
code_blocksInput

Description

Sets EnableSolidCollisions on all shapes of this body. Returns true if any of the physics shapes have solid collisions enabled.

Usage

Use this property to enable or disable solid collisions for all shapes associated with a PhysicsBody. This is useful when you want to control whether the physics body should interact with other solid objects in the simulation.

Example

// Example of enabling solid collisions for a PhysicsBody
PhysicsBody myPhysicsBody = new PhysicsBody();
myPhysicsBody.EnableSolidCollisions = true;

// Check if solid collisions are enabled
bool areSolidCollisionsEnabled = myPhysicsBody.EnableSolidCollisions;
if (areSolidCollisionsEnabled)
{
    // Perform actions knowing that solid collisions are enabled
}