Game Development Community

Setmovedestination behavior

by Steve D · in Torque Game Engine · 06/11/2008 (9:15 am) · 2 replies

Anyone else notice that when you give a bot coordinates with setmovedestination it doesn't go to the precise location but it is off by sometimes as much as half a world unit? It happens every single time, is this a "bug" or is it something I'm doing wrong? Is there anyway to make the bot stop on the exact coordinates you give it? I know, what does it matter if they are off by a small amount but if you have some bots moving around on a grid then half a world unit off is a lot.

#1
06/11/2008 (9:44 am)
I think it was designed to give the bots a little 'tolerance', so they didn't take ages positioning themselves exactly. Look up AIPlayer::mMoveTolerance. It is initialised as 0.25. You could either change that hardcoded value, or move the value into PlayerData, so it can be set per player type.
#2
06/11/2008 (10:17 am)
That's really good info Daniel, so for zero tolerance I would have to set it to 0?