GrabberJoint

GrabberJoint

new GrabberJoint(sprite)

A Grabber joint enables you to grab sprites and move them with a max force towards a target position.
Source:
Parameters:
Name Type Description
sprite Sprite the sprite to grab

Extends

Classes

GrabberJoint

Members

maxForce :Number

The maximum force that the joint can exert on the sprite.
Default Value:
  • 1000
Source:
Type:
  • Number

target :Object

The target position of the joint that the sprite will be moved towards. Must be an object with x and y properties.
Source:
Type:
  • Object