object:getTarget()

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

Overview

Returns the current target coordinates of a "touch" joint as specified by object:setTarget().

Syntax

object:getTarget()

Example

myJoint:setTarget( 100, 225 )

local tx, ty = myJoint:getTarget()
print( tx, ty )