文档

Unity Engine

Unity Engine

freezeRotation

Controls whether physics will change the rotation of the object.
阅读时间1 分钟最后更新于 1 个月前

Definition

  • Type: Property
  • Namespace: UnityEngine
  • Assembly: UnityEngine.Physics2DModule
public bool freezeRotation { get; set; }

Remarks

If freezeRotation is enabled, the rotation in Z is not modified by the physics simulation.
Additional Resources: Rigidbody2D.constraints.