How to map vehicle beam suspension to wheel positions (from wheel colliders)?
I'm making a truck game. My trucks drive very nicely, and the wheels bobble up and down correctly when the wheel colliders tell them to. However, the axle/drive-shaft (meshes) are currently fixed: really I need the axle to follow the wheel movement.
So, the axle/drive mesh is a "T" shape, with the base of the "T" disappearing into the bottom of the vehicle body, and a wheel on each end of the "T"'s arms. The base of the T needs to remain where it is, acting like a ball-socket, and the arms need to be "glued" to the wheel positions (also by ball-socket-like joins).
E.g., you can see in this (Beam NG) video the way the rear axle should work: https://www.youtube.com/watch?v=HXvFbcZTs0A My rear axle currently doesn't move at all.
I've had a look at character joints, but I'm not sure I can use them here (the wheel-movement is already sorted out, I just want the axles to follow it; also I don't really need physics here, juts "tracking"). I'm thinking there is probably some simple mathsy stuff in Unity somewhere that will sort this out. I begin with the three points of the "T" perfectly aligned with the wheels and truck-body; then I know the delta-values for the arms of the "T": some rotation will put the T where I need it to be. <