How to limit chaos vehicle top speed?

How can I limit the chaos vehicle top speed? Example like limiting only to 200kph

Hey there @BeastNectus! So because chaos vehicles are simulation based, there’s tons of variables that go into determining how fast the car is going at any point in time.

The proper way includes the simulation pieces, all of these values (and more including the wheels, surfaces physical materials, and transmission) control the total speed. So you’d have to do a solid chunk of math to determine where the tweaks should go.

That said, if you don’t mind being hacky/lazy with it, limiting the top speed of the vehicle (in total including impulses from elsewhere), you could just clamp the velocity. However this brings some overhead (as anything does being on tick) and a couple of gameplay issues can arise from doing it this way. The hacky way takes away all player throttle past this point. I’ll include it, but don’t recommend it. The proper method isn’t as clean but feels less arbitrary and more natural.

Here I set it to 100 kph to show it off since my map was a bit smaller.
2022-11-22_20-58-20

1 Like