CreateMouseJoint

Description

Creates a mouse joint between a point and a sprite. This is typically used when dragging a shape with the mouse pointer, and attempts to move the sprite towards the given point using a force up to the maximum given. Specify an anchor point in world coordinates that will act as the initial hold point on the sprite. Any further change in the target position will attempt to move that point of the sprite to the new location. Use SetJointMouseTarget to change the location of the target position.

Definition

CreateMouseJoint( iJointIndex, iSpriteIndex, x, y, maxForce )

integer CreateMouseJoint( iSpriteIndex, x, y, maxForce )

Parameters