Hi all, I'm using a waypoint system for my racing AI, and am using triggers to determine if the racer has reahed a waypoint. The AI takes the position of the targeted waypoint and localizes the position. If the position of x is less than 0, it turns left; if it is more than 0, it turns right. However, sometimes the AI turns away from the waypoint without being hit or affected and crashes into the wall, and just stays there, and keeps going forward, even though the wall and it has zero friction (can turn along the wall) and the waypoint is just a few meters left from it. Sometimes, it turns but goes back the wrong way of the track. What can be done to solve this?
Many thanks!
↧