book_4_sparkGenerated
code_blocksInput

Description

The PhysicsMotionType.Invalid field is a member of the PhysicsMotionType enumeration within the Sandbox namespace. It represents an invalid or uninitialized state for a physics motion type. This value is typically used as a default or error state, indicating that the motion type has not been set or is not recognized.

Usage

Use PhysicsMotionType.Invalid when you need to check or set a physics motion type to an uninitialized or error state. This can be useful for debugging or ensuring that a physics body has a valid motion type before performing operations on it.

Example

// Example of using PhysicsMotionType.Invalid
PhysicsBody body = new PhysicsBody();

// Check if the motion type is invalid
if (body.MotionType == PhysicsMotionType.Invalid)
{
    // Handle the invalid motion type case
    Log.Warning("Physics body has an invalid motion type.");
}