Legacy Documentation: Version 4.5.0

Script language:

  • JS
  • C#
  • Boo
Script language

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

var angularVelocity: float;
float angularVelocity;
angularVelocity as float

Description

Angular velocity in degrees per second.

Unlike a 3D Rigidbody, a Rigidbody2D can only rotate around one axis (perpendicular to the plane) so the angular velocity is just a float value rather than a vector. Typically, the value of this property is not set directly but rather by applying torques to the rigidbody. The angular velocity will also decrease automatically under the effect of angular drag.

See Also: velocity, AddTorque, AddForceAtPosition, angularDrag, Rigidbody.angularVelocity.