Community Forum

Vehicle steering from script

Forum Overview >> Scripting

Created17.03.2016 10:55

Thomas Nagels (Unknown) 17.03.2016 10:57

How do I steer a vehicle from a script? I would like to o it in such a way that all steered wheels respond to it at the proper ratio's.

(FYI: the goal is to create a tow bar which makes the vehicle steer as well, so that single players can properly tow vehicles.)


Emil Drefers (Unknown) 18.03.2016 07:47

as can be seen in the default scripts, the vehicles are steered by setting the variable "self.rotatedTime". (line 673 and following)
At least that is the way how the input is mapped to the rotation of the wheels.

Whata you need is probably a way to transfer an angle between the towbar and the attached vehicle to the rotation of the steering.
For this you can get some ideas from the steering of trailers. (line 362 and following)


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