Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

What is the difference between an application of an impulse and an application of a force in relation to a physics engine?

share|improve this question

1 Answer 1

up vote 11 down vote accepted

An impulse is applied instantly, so it does not depend on the time step. You would use an impulse when you want to give a fixed boost of speed to something, or the physical action happens to quick (ex. bullets/gun ricochet, collisions, jumps, instant speed ups).

Meanwhile a force changes the speed directly proportional to the time step. You use it for things that have an over time effect (ex. gravity, long springs, air resistance).

Mathematically impulse = force * time; And for reference impulse = mass * velocity, force = mass * acceleration.

share|improve this answer
    
Since impulse = force * time, the impulse is also time dependent (at least if you use forces to get the impulse's magnitude). Indeed, momentum or impulse is useful for applying instantaneous dramatic changes. The most popular example comes from the laws of conservation of momentum and energy: physics.ohio-state.edu/~gan/teaching/spring99/C10.pdf. –  teodron Aug 12 '12 at 12:13
    
So is the implementation by Jeff Lake via Game Coding Complete 3rd Ed. Chapter 15: Collision and Simple Physics incorrect: (paraphrasing) Start with a Vector3d (or 2d depending) of forces F, Accumulate all Forces applied in a list, Accumulate All Impulses in a list add both totals to Forces, empty Impulses list, Accel = F / mass, Vel += Accel * deltaTime, Pos = Vel * time. –  Casey Aug 12 '12 at 17:56
    
@Casey: that is how I do it. In my simulator I can't use the rigid body case where two bodies collide and everything works out directly. Following the Newtonian way of integrating the acceleration to find the velocity and then the position. My impulses are derived from a repulsion force (response/reaction force is a synonym in my understanding): i = F_response * DTime. You can go either ways: use the i impulse to correct the velocities after the collision, or use directly the response force. If you get the impulse from somewhere else, you canconvert it to an F_response and it works OK. –  teodron Aug 13 '12 at 10:24
    
@teodron Thanks, that brings up a separate question which I'll ask ...separately. :P –  Casey Aug 13 '12 at 15:20

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.