object:applyAngularImpulse()

Type Function
Object Body
Library physics.*
Return value none
Revision Release 2024.3703
Keywords body, applyAngularImpulse
See also object:applyTorque()
object.angularVelocity
object.angularDamping
object:applyLinearImpulse()

Overview

Similar to object:applyTorque() except that an angular impulse is a single momentary jolt.

Syntax

object:applyAngularImpulse( appliedForce )
appliedForce (required)

Number. Amount of force to apply.

Example

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

-- Add a body to the rectangle
physics.addBody( myRect, "dynamic" )

-- Apply angular impulse
myRect:applyAngularImpulse( 100 )