Ok this is a little complex, but ill try to explain the best I can.
I have been working on my own custom wheel collider for a while, because the built in one isnt that good. I have created something that works pretty well.
Its sphere cast based, casting a sphere down from the top of the suspension to find the contact point of the wheel, the distance is used for suspension forces etc.
In order to keep it stable, I calculate a maximum friction force that can be applied using the following method. First i calculate the effective mass of the rigidbody in both the forward and right directions of the contact point, multiply this by the slip in those directions, then scale this by a factor based on friction. This factor is calculated as the friction force of the tyre (coefficient * normal force) divided by the total friction force across all contacts for that rigidbody. I then divide this by the timestep to yield the force that would eliminate any slip within a single timestep without overshooting.
This keeps things very stable, but it doesnt allow for static friction, as there needs to be slip for there to be friction. The way i currently solve this is by integrating the accumulated forces and torques into a predicted velocity and angular velocity for the rigidbody, and then use these to calculate the slip, rather than the current point velocity. Its easier to just get what the slip would be, and oppose it using my current method than to calculate the amount of force acting at each contact point that friction would try to oppose (im not even sure how I would do this).
This method works well, however it only works for a single rigidbody. I want to add rigidbody doors with a hinge joint to the car, and I may want to make the wheels physics bodies as well at some point. I may even use articulation bodies because they seem to work well for something like this, and i have had issues with joints in the past.
Basically my question is, how might I go about calculating the static friction for a vehicle comprised of multiple rigidbody/ articulation bodies?