HingeJoint

HingeJoint

new HingeJoint(spriteA, spriteB)

Hinge joints attach two sprites together at a pivot point, constraining them to rotate around this point, like a hinge. A known as a revolute joint.
Source:
Parameters:
Name Type Description
spriteA Sprite
spriteB Sprite

Extends

Classes

HingeJoint

Members

angle :Number

Read only. The joint's current angle of rotation.
Default Value:
  • 0
Source:
Type:
  • Number

lowerLimit :Number

The lower limit of rotation.
Default Value:
  • undefined
Source:
Type:
  • Number

range :Number

The joint's range of rotation. Setting the range changes the joint's upper and lower limits.
Default Value:
  • undefined
Source:
Type:
  • Number

upperLimit :Number

The upper limit of rotation.
Default Value:
  • undefined
Source:
Type:
  • Number