I have been working on a custom wheel collider for some time now, and have a pretty robust implementation using a spherecast with some additional stuff to solve problems like suspension bottoming out/zero suspension and wheel width and things like that.
An issue i have however is that the suspension can only move up and down. I tried before using configurable joints and rigidbody with sphere colliders and cylindrical mesh colliders for the wheels to be able to configure mutliple different suspension geometries, and it worked out relatively fine when on smooth flat ground, but the moment you hit a curb or had some wonky terrain (or even just a ramp that was too low poly) it would rip the wheels off, bring the vehicle to halt, magically attatch the wheels back on again and then fling the vehicle into space.
The problem the joints is that they are not particularly stable (at least not for this use case in my experience), however i recently came across the articulation body, and throwing together a very rudimentary test, just a box with 1000kg articulation body as the root, with 4 20kg articulation bodies attached as the wheels with prismatic joints, it seems to be relatively stable (i havent actually driven it as my current vehicle system and tyre model would need to be redone, and im not sure how to fully use articulation bodies, as it doesnt make a whole lot of sense to use one on the body of the vehicle?) as i can set the spring damper values to anything i want without causing problems, and it appears that the constraints are inviolable?
Also, using physical colliders for the wheels is somewhat janky, and have recently discovered the ContactModificationEvent which has somewhat helped me fix this. Currently I am just aligning the normal of any collision to be Inline with the suspension to fix the poor collision handling with curbs and such, but its janky in other ways still, and requires me to use only discrete collision detection.
What is generally the best way to go about having this kind of suspension geometry? I want to gradually build up the complexity and realism of my vehicle simulation slowly over time, but as of now i think i will be ok with working out how to have stable implementatios of fixed suspension (think BMX, no suspension), straight up and down, and pivoting around some other point (motorbike swingarm kind of thing).
this isnt for any particular game i have planned, just for some experimentation and experience.