Description
The Static
field of the PhysicsMotionType
enumeration represents a motion type where the object cannot move at all. This is typically used for objects that are part of the environment and do not need to be affected by physics simulations, such as walls or floors.
Usage
Use PhysicsMotionType.Static
when you want to define an object that should remain stationary and not be influenced by any physics forces or collisions. This is ideal for static level geometry or any object that should not move during gameplay.
Example
// Example of setting a physics body to be static
PhysicsBody body = new PhysicsBody();
body.MotionType = PhysicsMotionType.Static;
// This body will not move or be affected by physics forces.