Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


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

FreezeAllFreeze rotation and motion along all axes.
FreezePositionFreeze motion along the X-axis and Y-axis.
FreezePositionXFreeze motion along the X-axis.
FreezePositionYFreeze motion along the Y-axis.
FreezeRotationFreeze rotation along the Z-axis.
NoneNo constraints.