Difference between force and impulse

Discuss new features and future development.

Re: Difference between force and impulse

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.
Chipmunk4PB: The fastest way to write games together with PureBasic and the Chipmunk physics engine. Get it here: http://www.dreifrankensoft.de

aisman

Posts: 139
Joined: Tue Mar 04, 2008 2:21 am