object:getRotationLimits()

Type Function
Object Joint
Library physics.*
Return value Numbers
Revision Release 2024.3703
Keywords joint, getRotationLimits
See also object:setRotationLimits()
Physics Joints (guide)

Overview

This function returns the current negative and positive rotation limits of a "pivot" joint.

Syntax

joint:getRotationLimits()

Example

myJoint.isLimitEnabled = true
myJoint:setRotationLimits( -45, 45 )

local negLimit, posLimit = myJoint:getRotationLimits()
print( negLimit, posLimit )