Page 1 of 1

Re: Difference between force and impulse

Posted: Tue Jun 09, 2015 12:08 am
by aisman
This can be found on the documentation:
People are sometimes confused by the difference between a force and an impulse. An impulse is a very large force applied over a very short period of time. Some examples are a ball hitting a wall or cannon firing. Chipmunk treats impulses as if they occur instantaneously by adding directly to the velocity of an object. Both impulses and forces are affected the mass of an object. Doubling the mass of the object will halve the effect.
•void cpBodyApplyForceAtWorldPoint(cpBody *body, const cpVect force, const cpVect point) – Add the force force to body as if applied from the world point point.
•void cpBodyApplyForceAtLocalPoint(cpBody *body, const cpVect force, const cpVect point) – Add the local force force to body as if applied from the body local point point.
•void cpBodyApplyImpulseAtWorldPoint(cpBody *body, const cpVect impulse, const cpVect point) – Add the impulse impulse to body as if applied from the world point point.
•void cpBodyApplyImpulseAtLocalPoint(cpBody *body, const cpVect impulse, const cpVect point) – Add the local impulse impulse to body as if applied from the body local point point.

And this is what I found on the forum:
This is actually a question that comes up a lot. Impulses add directly to the velocity, forces add to the forces applied to that body which affect the velocity over time. Use impulses for short fast acting forces like cannons firing or a character jumping. Use forces for long drawn out forces like thrusters or springs.