Basics

Guides

API Reference

Menu

Basics

Guides

API Reference

class: FrictionJoint

[17:7] extends: Joint

Wraps jbox2d's FrictionJoint (com.almasb.fxgl.physics.box2d.dynamics.joints.FrictionJoint). Applies friction-like resistance to the relative motion of two bodies. Exposes both a linear maxForce and an angular maxTorque cap.

Methods

  • FrictionJoint ()

    Empty default constructor; populated by adopt.

  • adopt (object Ajo)

    Wraps an existing FrictionJoint AussomJavaObject.

  • getLocalAnchorA ()

    Returns the local anchor on body A as a Vec2 wrapper.

  • getLocalAnchorB ()

    Returns the local anchor on body B as a Vec2 wrapper.

  • setMaxForce (double Force)

    Sets the maximum friction force in N.

  • getMaxForce ()

    Returns the maximum friction force in N.

  • setMaxTorque (double Torque)

    Sets the maximum friction torque in N*m.

  • getMaxTorque ()

    Returns the maximum friction torque in N*m.