Legacy Documentation: Version 4.6(go to latest)
Language: English
  • C#
  • JS
  • Boo

Script language

Select your preferred scripting language. All code snippets will be displayed in this language.

Rigidbody2D.fixedAngle

Switch to Manual
public var fixedAngle: bool;

Description

Should the rigidbody be prevented from rotating?

If this property is set to true, the rigidbody will not rotate in response to collisions and torques. This is useful when you want an object to have restricted rectilinear movement but still be controlled by physics in other aspects.

See Also: Rigidbody.freezeRotation.