RigidbodyConstraints2D
Use these flags to constrain motion of the Rigidbody2D.
Read time 1 minuteLast updated 10 days ago
Definition
- Type: Enum
- Namespace: UnityEngine
- Assembly: UnityEngine.Physics2DModule
[Flags]public enum RigidbodyConstraints2D
Remarks
Additional Resources: Rigidbody2D.constraints.
Fields
Value | Description |
|---|---|
| FreezeAll | Freeze rotation and motion along all axes. |
| FreezePosition | Freeze motion along the X-axis and Y-axis. |
| FreezePositionX | Freeze motion along the X-axis. |
| FreezePositionY | Freeze motion along the Y-axis. |
| FreezeRotation | Freeze rotation along the Z-axis. |
| None | No constraints. |