Download

Modifying vehicle suspension parameters within the blueprint

I am playing around with the new ‘Vehicle Advanced’ example and would like to set up a system of active suspension to help the vehicle lean into corners. Is it possible for me to access the suspension parameters from the blueprint?

I would also like to access information such as the load on each wheel and how much it is slipping to use as inputs for the active suspension algorithm. This information comes up when you type ‘showdebug vehicle’ into the console so I am assuming I can access it somehow.

I don’t have much experience with c++ so it would be best if it’s possible to do it in the blueprints. Although I do have quite a lot of experience coding in other languages so it’s not a big problem if I have to do some.

change ‘suspension force offset’ to a - number in the wheel blueprint to make it lean
the only way i know to access the tire slip is in c++, maybe this will help
https://forums.unrealengine.com/showthread.php?49529-car-tyre-skid-marks&p=165413&viewfull=1#post165413
DebugLatSlip and DebugLongSlip

btw the vehicle wheels are really messed up at their core, we have to wait until mid 2015 for an improvement (hopefully)
https://forums.unrealengine.com/showthread.php?48843-Horrible-Car-Physics&p=186839&viewfull=1#post186839

Thanks. I’ve noticed the wheels and suspension behave strangely in some situations. I might try starting a vehicle from scratch but I fear I have a lot to learn before I will be able to get around to programming the physics. (I understand the physics well, just have to get used to the way Unreal Engine works and learn a bit more about c++).

In the mean time, I will use the trick of moving the suspension force offset to achieve most of what I want.

UPDATE: I’ve tried that trick and it produces some very bad results (the car lifting off the ground when accelerating and leaning horribly when on a slope). I might actually go back to Unity (where I started making this game) as what was stopping me was some issues with their spring joints but I have realised it wouldn’t be hard to implement my own code for it.