physics2D.setJointLimitOn

Section: Physics 2D (Box2D)

What it does

physics2D.setJointLimitOn sets JointLimitOn on a physics2D object. It takes id, min and max.

Signature

physics2D.setJointLimitOn(id, min, max)

Arguments

  • id
  • min
  • max

Example · generated

function update(dt) {  physics2D.setJointLimitOn('main', 0, 1);}

physics2D.setJointLimitOn is called with values of the shape its signature asks for. The code sits in update(dt), which the engine calls every frame: dt is the time since the last one, in seconds.

7 members in physics2D