文档

Unity Engine

Unity Engine

RigidbodyConstraints2D

Use these flags to constrain motion of the Rigidbody2D.
阅读时间1 分钟最后更新于 1 个月前

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.