Community Forum

Wheel suspension modification

Forum Overview >> Scripting

CategoryScripting
Created04.02.2024 14:51


Bram Nic (bn122) 04.02.2024 14:51
What's the best way of modifying damper/suspTravel/spring variables when a vehicle is loaded?

I've tried using the main onUpdate() function and keeping track of a state so that variables only get updated once. Eg. I loop through the wheels and set wheel.suspTravel = wheel.suspTravel + 0.1. Then set the state to false to prevent further updates. It doesn't seem very reliable for multiple vehicles, as if this code doesn't run on more than one vehicle.

I feel there's a better way of doing this than using onUpdate() and do eg. on post vehicle load, but not sure how to approach that or which function I could append to. Any ideas?


Note: Log in to post. Create a new account here.