HI Cara,

Hmmm...Doesn't look too bad. I should be able to add the necesssary
code to the Calculation module of the engine so it normalizes vectors
before handing off that info to the object requesting a new end point.


On 12/11/10, Cara Quinn <caraqu...@draconisentertainment.com> wrote:
> Hi again Thomas;
> -A couple of things I forgot to mention in my last note. Firstly, before you
> send x or y to your getX or getY methods, the vector should already be
> normalized. I overlooked this before as I was only looking at what your
> methods were returning.
> You can normalize your current vector of travel by doing the following:
> • subtract the start and end points of your vector, as in: x2 - x1, y2 - y1,
> and z2 - z1.
> • get the length (len) of the vector by first getting the square root of x^2
> + y^2 + z^2.
> • and then divide the vector by the length as in: x = x / len, y = y / len,
> and z = z / len.
> • this is your new normalized vector, which you can then magnify (multiply)
> by a desired move rate or some such number to get a proper end point.
> HTH!
> Cara :)

Gamers mailing list __ Gamers@audyssey.org
If you want to leave the list, send E-mail to gamers-unsubscr...@audyssey.org.
You can make changes or update your subscription via the web, at
All messages are archived and can be searched and read at
If you have any questions or concerns regarding the management of the list,
please send E-mail to gamers-ow...@audyssey.org.

Reply via email to