How can I simulate a projectile sticking to/into an object? (e.g. arrow hitting an apple & transferring its momentum)

I hear this is called a “perfect inelastic collision”, and I can get partway there by setting the restitution to 0 – but I’m not sure how to make them join together (probably into a multibody?) but only after the transfer of momentum has taken place.


I’d suggest to:

  1. Setting the restitution to 0 like you did.
  2. Detect the time when the collision occurs (by interpreting contact events for example) and when this happens, remove the projectile body and collider from the world and then create a new collider with the projectile shape, and attach it to the target’s body.

Another option if you intend to detach this projectile later is to join it to the target using a FixedConstraint which you can remove easily later.

Using a multibody is a possibility but likely overkill for this use-case.

1 Like