Difference between force and impulse

Discuss new features and future development.
Post Reply
aisman
Posts: 145
Joined: Tue Mar 04, 2008 2:21 am
Contact:

Re: Difference between force and impulse

Post 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.
Chipmunk4PB: The fastest way to write games together with PureBasic and the Chipmunk physics engine.
Post Reply

Who is online

Users browsing this forum: No registered users and 5 guests