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 or are otherwise immovable, such as walls or floors.
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 or are otherwise immovable, such as walls or floors.
Use PhysicsMotionType.Static
when you want to define an object that should remain stationary and not be affected by physics simulations. This is useful for objects that are part of the static environment in a game scene.
// 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.