Description
The Dynamic
field of the PhysicsMotionType
enum represents a physically simulated body. This means that the object is subject to physics forces and interactions, such as gravity, collisions, and other dynamic effects. It is used to define the motion type of a PhysicsBody
in the Sandbox environment.
Usage
Use the PhysicsMotionType.Dynamic
when you want a physics body to be fully simulated by the physics engine. This is suitable for objects that need to react to forces and collisions in a realistic manner.
Example
// Example of setting a PhysicsBody to be dynamic
PhysicsBody body = new PhysicsBody();
body.MotionType = PhysicsMotionType.Dynamic;
// This body will now be affected by physics forces and collisions.