What is the difference between an application of an impulse and an application of a force in relation to a physics engine?
Answer
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 too quickly (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_change
, force = mass * acceleration
.
If you expand the first, you can check this:
impulse = force * time
->impulse = mass * acceleration * time
and sinceacceleration * time = velocity_change
->impulse = mass * velocity_change
.
No comments:
Post a Comment