object.angularVelocity

Type Number
Object Body
Library physics.*
Revision Current Public Release (2017.3135)
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