AiPlayer slowdown
by Petter Holmberg · in Torque Game Engine · 09/02/2005 (9:43 am) · 4 replies
This is related to my previous post here:
www.garagegames.com/mg/forums/result.thread.php?qt=34046
I may have found the reason why the player "spins" upon arrival at a destination point. If you simply walk from point A to point B with setMoveDestination(%xyz, 0), there appears to be a problem when the AiPlayer stops. On the other hand, if I walk with a slowdown (setMoveDestination(%xyz, -1)) the problem does not appear. onReachDestination works in either case, but the player will only stop completely when walking with slowdown.
I don't mind using a walk with slowdown for the last point on a path, but I need to minimize that slowdown. Ideally it wouldn't even be noticeable, because it doesn't suit my game. Can I do this from the script side?
www.garagegames.com/mg/forums/result.thread.php?qt=34046
I may have found the reason why the player "spins" upon arrival at a destination point. If you simply walk from point A to point B with setMoveDestination(%xyz, 0), there appears to be a problem when the AiPlayer stops. On the other hand, if I walk with a slowdown (setMoveDestination(%xyz, -1)) the problem does not appear. onReachDestination works in either case, but the player will only stop completely when walking with slowdown.
I don't mind using a walk with slowdown for the last point on a path, but I need to minimize that slowdown. Ideally it wouldn't even be noticeable, because it doesn't suit my game. Can I do this from the script side?
#2
B--
09/02/2005 (2:38 pm)
Sounds like it is time for you to dive into the C++ side of things! Do you have the source code? If you do then the player.cc file is where you will find the answers. You will learn quite a bit by browsing through it.B--
#3
09/02/2005 (5:21 pm)
Yes, I suppose so... It's caused by the engine somehow, possibly because something with the models is fishy. It's strange that the orc and my models make for a different effect, although it's without doubt related. It's worth noting that my AiPlayer walks are usually between points that are pretty close to each other. Maybe it has something to do with things. Another strange thing is how this effect has gone from practically never happening to happening frequently without any code changes affecting walks. What has changed that could matter is that more content has been put into the mission file. It's pretty heavy on the graphical side as it uses complex static shapes. Up until recently there have been only one AiPlayer in the game though.
#4
I've tried the solution you offered but seems it doesn't work for me,
then I moved the eye node closer to the center of the bounding box,
(it's originally at the animal's head, which is 2 to 3 units aways from the centre of the bounding box)
it seems that the spinning problem is solved now.
See if it helps
03/19/2006 (7:08 pm)
I was making an animal model and having the same spinning problem, I've tried the solution you offered but seems it doesn't work for me,
then I moved the eye node closer to the center of the bounding box,
(it's originally at the animal's head, which is 2 to 3 units aways from the centre of the bounding box)
it seems that the spinning problem is solved now.
See if it helps
Torque 3D Owner Petter Holmberg