bool IsDynamic { get; set; }

robot_2Generated
code_blocksInput

Description

The IsDynamic property of the Collider class indicates whether the collider is using dynamic physics. If the collider is dynamic, it will return true. If the collider is a keyframe body or a static physics body, it will return false.

Usage

Use the IsDynamic property to determine the physics behavior of a collider. This can be useful for deciding how to handle collisions or interactions with other objects in the scene.

Example

// Example of checking if a collider is dynamic
Collider myCollider = new Collider();

if (myCollider.IsDynamic)
{
    // Perform actions specific to dynamic colliders
    // For example, apply forces or handle dynamic interactions
}
else
{
    // Handle static or keyframe collider behavior
}