Box2D. Box2dFrictionJoint

Box2D Friction Joint

  • Used to apply top-down friction
  • Provides 2D translational friction and angular friction

Constructor

new Box2dFrictionJoint(objectA, objectB, anchor, collideopt)

Create a friction joint

Parameters:
NameTypeAttributesDefaultDescription
objectABox2dObject
objectBBox2dObject
anchorVector2
collideboolean<optional>
false

Extends

  • Box2dJoint

Methods

getLocalAnchorA() → {Vector2}

Get the local anchor point relative to objectA's origin

Returns:
Type: 
Vector2

getLocalAnchorB() → {Vector2}

Get the local anchor point relative to objectB's origin

Returns:
Type: 
Vector2

getMaxForce() → {number}

Get the maximum friction force

Returns:
Type: 
number

getMaxTorque() → {number}

Get the maximum friction torque

Returns:
Type: 
number

setMaxForce(force)

Set the maximum friction force

Parameters:
NameTypeDescription
forcenumber

setMaxTorque(torque)

Set the maximum friction torque

Parameters:
NameTypeDescription
torquenumber