Calculating Kinematic+Dynamic Rigid body collision.

Hi guys i have a Kinematic body i want colliding with a dynamic Rigidbodies but i dont unity to calculate the reaction for the dynamic body.
I am trying to calculate the collision force myself in the kinematic body’s OnCollision events and then apply the force a calculated force to the rigidbody. how do I ensure Unity does not interfere

If you turn off the rigidbody’s detectCollisions and useGravity properties during the OnCollisionEnter function then only forces that you apply yourself will affect it. You can then turn the rigidbody’s isKinematic setting off and use AddForce to apply your own force to it.

Would that not mean other objects cannot interract with this object?

In all honesty even my proposed collision forced doesnt work gread. I built a ragdoll with verlet integration (Lets just ay it is very important i use this method). I considered useing swepth spheres down each link (lenght constrain) but i realized this would not allow self coliding hence i used a capsule (still a swptSphere). The problem is that since it is kinematic the collision always has an inaccurate relative velocity reading.

So i need to calculate the pentration depth and use it with the relative velocity and momentum to calculate the forces. I get stuck at calculating the penetration depth and ray casting is a total no no (60 fps per body).

Any hints? The capsule is off-centered and rotated to perfectly match the characters geometry. I would have loved to use a bunch of spheres but unity is up tight about multiple coliders on 1 body.

How expensive is rigidbody.ClosestPointOnBounds(Vector3)?

I plan to take the contactpoint and find its angle to the center of my colliders bounds (subtract and normalize)
Then project it by a magnitude of my bound.extents.magnitude //+skinWidth?
Then plug it into the rigidbody.ClosestPointOnBounds();
and use that and the contactpoint’s difference as the penetration

//Basically

//Projection
Vector3 projection = ((b.center - contactPoint.point).normalized() * b.extents.magnitude);
float penetration = (rigidbody.ClosestPointOnBounds(projection) - contactPoint.point).magnitude;