Replicating live axles, swingarms etc.

I’ve got a game that has a lot of different kinds of vehicles, and one thing I’m wanting to do is to replicate the things that make different cars, trucks and bikes handle differently from each other in real life. This game is aimed towards my car club, so these are guys who understand the differences in handling between cars with independent suspension, and those with live axles.

What I’m looking for are suggestions on how to create a live axle setup on either end of the vehicle, rather than independent suspension. This makes a difference in real life in the handling of the car, and I am sure it will make a difference in the game with high speed handling, drag racing, and four wheel drive usage.

I’m thinking maybe zero suspension on the wheel colliders, and adding spring joints between an axle component and the vehicle chassis. Should I use an IK bone for this axle, or an axle mesh with a rigidbody component?

In a similar vein, I’m also wanting to create realistic meshed swingarm action for the motorcycles and for the CV shafts on the car axles that DO use independent suspension. Would this require hinge joints on each end of a CV shaft, for instance, or where the swingarm pivots for a motorcycle? This answer would be helpful in creating front forks for bikes that steer with the wheel.

Another similar question concerns the telescoping action of visible shock absorbers and bike forks. IK bones for this?

I’ve got T-buckets, hot rods, muscle cars, sports cars, dirt bikes, Harleys, mountain bikes, Baja Bugs and Trophy Trucks that are running really well now, but having the wheels hanging out in midair by themselves just doesn’t look very nice. I need to have working forks/swingarms on the bikes, and working axles on the cars.

And in real life, some four wheel drive trucks have live axles in front, and others have independent front suspension. It makes a difference in their offroad ability. Live axles work best when climbing at speed in the really rough stuff, and independent works best for slow crawling over boulder piles.

In the same way, some sports cars use independent rear suspension, but most muscle cars use live axles. Baja Bugs etc. use independent rears.

The answers to these problems would also work for the walking beam suspension found on the rear of Semi trucks and buses. And for four-link setups for drag racing and monster trucks.

I am going to be starting work on the big rigs, buses, drag racers and monster trucks next, and that’s what made me really start thinking about this, and also my testers were upset about driving a '69 Javelin with IRS instead of a live axle setup(doesn’t drift the same), or offroading in a CJ5 with four wheel independent. These guys own many of the vehicles that are depicted in the game, so they will know the difference.

Any ideas on how to go about this? I’m not sure this is the right place to post this, but not sure where else it would go.

Although a wheel collider is really a raycast in disguise, it is actually possible to implement a wheel using a rotating collider. I would recommend doing this for things like boulder-crawling trucks and other cases where the exact behaviour of the wheel is significant (wheel colliders are really intended to simulate movement over a smooth road). With this type of set-up, you can use joints to connect the various components, so you could join the two half-axles together to form a live axle.

As regards the telescoping suspension, a bone system would work well but you would probably want to move the bones directly from the script rather than controlling an animation. The bones are configured as child transforms of the object that possesses them, and as such they can be accessed by transform.Find:-

var telescopeTop = susp.transform.Find("Top");
var telescopeBottom = susp.transform.Find("Bottom");

Thanks for the suggestions on this. I realize that this level of detail may not be necessary in most games, but I am confident that the simulation will produce a difference in performance between live axle and independent suspension setups.

I will implement the shock absorber and collider solutions you recommended I try, as well.

The current setup with independent suspension on everything is not without its advantages. For one thing, I now know how my real-life '74 Gremlin is going to handle, once I finish my current project on that car, an independent rear from a Ford T-Bird to go along with the 5 speed and 400 HP six with three two barrel carbs. In short, my little Gremlin is going to be a Corvette killer at the track. Having a simulator available gives me a certain advantage that most racers don’t have.

Unity is a great product, and it seems sometimes that the possibilities are endless, so that narrowing your choices to the best solution is not always done in the most obvious ways.

I’ll report back on my results, it might take a while for me to put this together.

very helpful topic. the swing arm and telescoping suspensions are rarely talked about. Glad to fined other people trying to find a solution. It would real be helpful to see your solution.
I am also trying to do the telescoping suspension with a bone. will see how that goes.
I also use a bone for the steering angle since the fork is at an angle and wheel colliders steers only around Z axis.
The swing arm is the most difficult for me. I am going to see if i can solve it with hinge joint or spring joint.