What it does
physics2D.setJointMotorOn sets JointMotorOn on a physics2D object. It takes id, speed and force.
Signature
physics2D.setJointMotorOn(id, speed, force)Arguments
idspeedforce
Example · generated
function update(dt) { physics2D.setJointMotorOn('main', 1, 10);}physics2D.setJointMotorOn 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.