JigLibJS offers functions to add force and apply impulse to a rigid body. Let's walk through the list of available functions and how they work:

addBodyForce=function(f, p) f: [x,y,z] magnitude of force along three axes. p:[x,y,z] position of force addWorldForce=function(f, p) f: [x,y,z] magnitude of force along three axes. p:[x,y,z] position of force addWorldTorque=function(t) t: [x,y,z] magnitude of torque along three axes. addBodyTorque=function(t) t: [x,y,z] magnitude of torque along three axes. applyWorldImpulse=function(impulse, pos) impulse: [x,y,z] magnitude of impulse(mass*velocity) along three axes. pos:[x,y,z] position of force applyBodyWorldImpulse=function(impulse, delta) impulse: ...

Start Free Trial

No credit card required