If you haven't done so already, be sure to visit the Wiki Portal to read about how the wiki works. Especially the Ogre Wiki Overview page.
Problem
You have a car and you have a point (i.e. waypoint), but you don't know how to determine to which side the car should turn to drive to the point (left or right).
Solution
Your first thought might be that solving this requires some math. But we like neither math nor magical formulas. Luckily, there is a clean, easy and simple solution. Just look at the picture:
Left Node and Right Node are children of the car node, placed on the same distance at the left and right of the car. I.e. if the car is initially oriented along (0,0,1), left node would be (-1,0,0) and right one (1,0,0). What is the solution? Just take side which node is closer to the waypoint. No math formulas!
Contributors to this page: jacmoe
and
Frozenrain
.
Page last modified on Saturday 02 of January, 2010 07:51:27 UTC by jacmoe
.
The content on this page is licensed under the terms of the Creative Commons Attribution-ShareAlike License.
As an exception, any source code contributed within the content is released into the Public Domain.

