PhysicsLock Locking { get; set; }

book_4_sparkGenerated
code_blocksInput

Description

The Locking property of the ModelPhysics class is used to manage the locking state of the physics simulation for a model. This property is of type PhysicsLock, which allows you to control how the physics engine interacts with the model, particularly in scenarios where you need to temporarily disable or modify physics interactions.

Usage

To use the Locking property, you can get or set its value to control the physics locking behavior of a model. This is useful in scenarios where you need to ensure that the model's physics state remains consistent during certain operations, such as animations or transformations that should not be affected by physics calculations.

Example usage:

ModelPhysics modelPhysics = new ModelPhysics();
modelPhysics.Locking = PhysicsLock.Locked;

In this example, the Locking property is set to PhysicsLock.Locked, which would prevent the model from being affected by physics interactions until the lock is released.

Example

ModelPhysics modelPhysics = new ModelPhysics();
modelPhysics.Locking = PhysicsLock.Locked;