object.angularVelocity

Type Number
Object Body
Library physics.*
Revision Release 2022.3683
Keywords body, angularVelocity
See also object.angularDamping
object:applyAngularImpulse()
object:applyTorque()

Overview

The numerical value of the current angular (rotational) velocity, in degrees per second. There is no minimum or maximum value — just adjust to get the desired results.

Example

-- Create a rectangle
local myRect = display.newRect( 0, 0, 100, 100 )

-- Add a body to the rectangle
physics.addBody( myRect, "dynamic" )
 
-- Set the rectangle's angular velocity
myRect.angularVelocity = 50