Description
The Static
field of the PhysicsBodyType
enumeration represents a physics body that does not move or respond to forces. It is typically used for objects that are part of the environment, such as walls or floors, which should remain stationary and not be affected by physics simulations.
Usage
Use PhysicsBodyType.Static
when you want to define a physics body that should remain immobile and not interact with other dynamic bodies through forces. This is ideal for static elements in your game world that serve as obstacles or boundaries.
Example
// Example of setting a physics body type to Static
PhysicsBody body = new PhysicsBody();
body.Type = PhysicsBodyType.Static;
// This body will not move or react to forces, making it suitable for static objects like terrain or buildings.