So, this is somewhat of a loaded question and I will try to do my best to explain it.
I am creating a vehicle AI system, and the vehicle has a Steer(x) function. X ranges from -1(steer left) to 1(steer right).
I'm trying to find the value that I need to pass to that function to steer my vehicle accordingly to a target, in this case the next checkpoint.
An example: Imagine a vehicle to the right of a checkpoint, this function should return something like -0.2 to steer the vehicle back towards the checkpoint.
I've posted this question on other forums, and had some pretty indirect answers that more or less just confused me. All of them did bring up trig functions however, but it's somewhat difficult for me to understand being a freshmen in HS.
If somebody could provide any insight on the way to achieve something like this, it would be awesome. Thanks!
↧