AI programming terminology
November 18, 2004 9:20 PM
Subscribe
I'm trying to read O'reilly's "AI for Game Developers," and it's a bit over my head. On page 17, there's an algorithm that moves a preditor towards a pray. There's a constant (or variable?) in the code called _TOL which isn't explained anywhere in the text. What is _TOL? Also, there's a variable (called v) that's defined buy never used. What gives?
Here's the code:
void DoLineOfSightChase (void)
{
Vector u, v;
bool left = false;
bool right = false;
u = VRotate(-Preditor.fOrientation, Prey.vPosition - Preditor.vPosition));
u.Normalize();
if (u.x < _tol) left=true;
else if (u.x > _TOL) right = true;
Preditor.setThruster(left,right);
}>
posted by grumblebee to computers & internet (5 comments total)
That's what it looks like to me, anyway.
posted by The Pusher Robot at 9:28 PM on November 18, 2004