Calculate vehicle steering for direction - helper for AI

jcarew
Posts: 9
Joined: Sun Jul 13, 2008 8:31 pm

Calculate vehicle steering for direction - helper for AI

Post by jcarew »

Hi, I'm working on AI for my vehicle and I have one problem. Enemies in my game use waypoint system for movment. In Bullet vehicle I can only apply steering for my vehicle, how can I calculate steering value when I know direction where is my waypoint. For turn type (LEFT, RIGHT or NONE) I use cross product between direction of my vehicle and my current waypoint direction. When I use const steering value my vehicle don't move forward but this movment is similar for snake move, so I have calculate properly steering value when my cross product is near 0.