object:getLimits()

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

Overview

This function returns the current negative and positive motion limits for a "piston" joint.

Syntax

joint:getLimits()

Example

myJoint.isLimitEnabled = true 
myJoint:setLimits( 100, 200 )

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