Changing body type right before the collision response

When a collision occurs between a kinematic body and a dynamic body, I want to set the kinematic body to dynamic before the collision is resolved. I want to do this because otherwise the dynamic body stops momentarily as the kinetic body consumes dynamic bosy’s energy…

I want the collision to behave as if that kinematic body was always a dynamic body. Other than adding a fake force OnCollisionEnter to speed up both bodies, I couldn’t find a good way to do this. (This fake force is hard to tweak because of dragging forces, etc… and again it still is not as smooth as dynamic to dynamic collision)

(I am doing these for enabling child rigid bodies on that kinematic body to represent a destructible structure)

How to solve this issue?

Why not making your kinematic body dynamic in the first place? Does it have to be kinematic?

You could make a simple collision test beforehand. Maybe adding an invisible sphere to object1 and an invisible sphere to object2. Those spheres are the “bounds” of your 2 objects, if they intersect/collide, set the kinematic body to dynamic. If they are not colliding anymore, reset it to kinematic. You could add sphere colliders that are set to trigger and set their parent transforms to the transforms of the according objects (object1 and object2). Of course, the bounds do not have to be spheres, it was just an example. The basic idea is to have a collision detection for the bounds of the objects and then a more detailed collision detection between the objects itself. That way you can set attributes of the objects when they are already near each other, but maybe not colliding yet.