object:setTarget()

Type Function
Object Joint
Library physics.*
Return value none
Revision Current Public Release (2014.2511)
Keywords joint, setTarget
See also object:getTarget()
Physics Joints

Overview

Sets the current target (follow) point of a "touch" joint in content space coordinates. This can be any specific content point, the location of the user's touch, the coordinates of some other object to follow, successive points along a path, etc.

Syntax

object:setTarget( targetX, targetY )
targetX, targetY (required)

Numbers. The target coordinates in content space.

Example

myJoint:setTarget( 100, 225 )