Actually not, since it happens in OnCollisionEnter, and car velocity is already reduced. Still, I set
partRb.velocity = car.velocity
and also later (more important)
car.velocity = collision.relativeVelocity
...to prevent the car from stopping at the object before it has physics enabled
partRb.velocity = car.velocity
and also later (more important)
car.velocity = collision.relativeVelocity
...to prevent the car from stopping at the object before it has physics enabled
Comments
I also had the issue of collisions (with static) stopping the object completely where you want it to actually retain some speed.
i like your 'hack' of just restoring velocity afterwards
mine was to just give everything an rb+mass
which is why you need to restore (some) velocity afterwards?
but the good thing is at least that impulse then only depends on ONE object's mass , not both
(I can't use RB with an existing mass for e.g. a sign post, it shouldn't move, only break)
Hitting objects with something works fine, but throwing an object and letting it break is a different story