skip to content

In a rigid-body simulation, what is the difference between applying a force and applying an impulse, and when do you use each?

level: juniorimportance: must knowfreq 70%

answer

  1. over a duration vs in one instant
  2. what the step length multiplies
  3. newtons vs newton-seconds
  4. velocity jumps by J over m

basics

~20 s

A force is a rate of momentum change, multiplied by the step length, so it suits continuous pushes like thrust. An impulse is the momentum change itself, applied at once (velocity jumps by J/m), so it suits instant events like explosions.

solid answer

~50 s

A force `F` is a rate: during a step of length `dt` it changes momentum by `F * dt`, so the integrator turns it into a velocity change `(F/m) * dt`, and it has to be applied every step it should act. An impulse `J` is the momentum change itself, in newton-seconds, applied immediately: `v += J / m`, with no `dt` involved. I use forces for anything continuous (gravity, thrusters, wind, buoyancy) so the effect per second is independent of step length, and impulses for instant events (explosions, kicks, hits). Applied at a point off the centre of mass, both also spin the body: the force through its torque `r × F`, the impulse through an angular velocity change `invInertiaWorld * (r × J)`. The classic bugs are unit mistakes: a one-step force for an explosion barely moves anything, and a per-step impulse for a thruster scales with step rate.

go deeper

for a junior

Recall the units: a force in newtons acts over time, an impulse in newton-seconds is a one-off momentum change, so velocity jumps by J divided by mass.

for a middle

Explain how a step accumulates forces and multiplies them by the step length, while an impulse goes straight into velocity, and show the one-step-force and per-step-impulse bugs with numbers.

for a senior

Diagnose effects that change with step rate or barely register, trace them to the wrong call or to pushes issued outside the physics step, and add the angular part for off-centre pushes.

for a principal

Weigh which push types a gameplay API should expose, such as force, impulse and mass-independent velocity change, so designers tune effects once and they survive step-rate changes.

## Two ways to change a body's momentum A rigid body's **linear momentum** is `p = m * v`: its mass times the velocity of its centre of mass. Newton's second law says momentum changes at the rate set by the net force, `dp/dt = F`. Every way a simulation pushes a body is a way of changing that momentum, and there are two of them. - A **force** `F` (measured in newtons, kg·m/s²) is a *rate*: it changes momentum continuously for as long as it acts. Over a time interval `dt` it delivers `F * dt` of momentum. - An **impulse** `J` (measured in newton-seconds, kg·m/s) is an *amount*: it is the momentum change itself, `J = integral of F over time`, delivered in one instant. Applied to a body of mass `m`, velocity jumps by `J / m` immediately. A collision is the classic case where the two meet: a very large force over a very short time is modelled as one impulse, because the simulation cannot resolve the few milliseconds of contact. How the solver computes those contact impulses is a subject of its own; here the point is only that an impulse is a finished change in momentum, not a force waiting to be integrated. ## What the simulation does with each A typical rigid-body step treats the two very differently: 1. **Forces are accumulated.** Every call that adds a force during the step (gravity, a thruster, wind, buoyancy) is summed into a per-body force accumulator, together with the torque each one produces about the centre of mass. 2. **The integrator consumes the accumulator.** During the step the total force is multiplied by the step length to change velocity, `v += (F_total / m) * dt`, and many engines then clear the accumulator so the force must be applied again next step. 3. **Impulses bypass the accumulator.** An impulse is applied straight to velocity at the moment it is requested: `v += J / m`. The step length does not appear. If the push acts at a point `p` that is not the centre of mass, both also change the spin. A force contributes the torque `r × F`, with `r = p - com`; an impulse changes angular velocity at once by `invInertiaWorld * (r × J)`. ## A worked number Take a 2 kg crate at rest, a physics step of 1/60 s, and a blast that should send it off at 5 m/s. | Applied as | Value | Momentum delivered in one step | Resulting speed | |---|---|---|---| | Impulse | 10 N·s | 10 N·s | 5 m/s | | Force for one step | 10 N | 10 × 1/60 ≈ 0.17 N·s | ≈ 0.083 m/s | | Force for one step | 600 N | 600 × 1/60 = 10 N·s | 5 m/s | The middle row is the common bug: the designer typed the right number into the wrong call, and the crate barely twitches. The last row shows the equivalence: a force of `J / dt` held for exactly one step delivers the impulse `J`, but only for that step length, so the tuning breaks the moment the step changes. ## Choosing between them - **Use a force** for anything that acts continuously and should scale with how long it acts: gravity, thrusters, engines, wind, drag, buoyancy, springs. Applied every step, it gives the same result per second whatever the step length. - **Use an impulse** for anything that happens at an instant and should deliver a fixed change in velocity: an explosion, a kick, a projectile hit, a knockback, a grapple yank. - **Mass still matters for both.** The same impulse moves a 1 kg bottle ten times faster than a 10 kg barrel. When a design wants every object to react identically regardless of mass, some APIs offer variants that set an acceleration or a velocity change directly; those are a convenience over the same two ideas, not a third physics. ## The classic bugs - **A one-step force for an instant event**, the 0.083 m/s crate above. - **A per-step impulse for a continuous push.** A 20 N thruster written as a 20 N·s impulse every step delivers 20 N·s per step: at 60 steps per second that is 1,200 N·s per second, sixty times too strong, and it changes again if the step rate changes. The correct per-step impulse would be `F * dt`, which is just a force applied by hand. - **Calling the push from per-frame rendering code** instead of the physics step, so the number of pushes per second follows the frame rate. - **Expecting an impulse to move the body's position.** It changes velocity; the position changes only when the next integration step advances the body. In an interview, the clean answer is the units: newtons are a rate of momentum change, newton-seconds are the change itself, and every bug above is a units mistake.

  • How do you apply an impulse at a point that is not the centre of mass?
    Split it into two effects. The linear velocity changes by `J / m`, exactly as if the impulse went through the centre of mass. The angular velocity changes by `invInertiaWorld * cross(r, J)`, where `r` is the vector from the centre of mass to the point of application and the inverse inertia is the world-space one for the body's current orientation. An off-centre impulse therefore adds spin without reducing the linear change.
  • Why is explosion knockback usually an impulse rather than a force held for a few steps?
    An impulse delivers a fixed velocity change regardless of the step length or how many steps run per second, so the knockback tunes once and stays tuned. A force held for N steps delivers `F * N * dt`, which changes whenever the step length or the duration logic changes, and it needs bookkeeping to stop it at the right time.

Pushing a shopping trolley down an aisle versus kicking it: the steady push builds speed the longer you keep it up, while the kick changes its speed in one instant, and a heavier trolley responds less to either.

  • An impulse is just a very large force, measured in the same units.
  • Applying a force during a single step gives the body its full push.
  • An impulse moves the body's position directly, not its velocity.
  • Applying the same impulse every step is fine for a constant thruster.
  • Mass does not matter for an impulse because it acts instantly.