object:getTarget()

Type Function
Object Joint
Library physics.*
Return value Numbers
Revision 2017.3178
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 )