Game Development Community

AIPlayer probs

by Chris Newman · in Torque Game Engine · 05/10/2005 (8:50 pm) · 4 replies

I have a AI Player that is just standing around.
I have its setAimObject() function set to the player.

When im some distance away he is looking right at me, but the closer i walk to it, he starts aiming a little bit more to the left of my player. When im close to him he is looking a good 45 degs to my left. And when i get even closer he spins around and around in circles.

I even tried this using a schedule and the setAimLocation() function.

I have a vid of this i made in FRAPS, for some reason its a huge file ~50 megs for a short 20 secind clip.
chazcross.phase9studios.com/files/torque/files/hmm.avi
*Edit
Ok i just compressed it to a WMV at ~400k
chazcross.phase9studios.com/files/torque/files/Movie.wmv


also when i have the ai follow the player, i am running backwards and he is always running for a spot slightly to my left.
WMV of this
chazcross.phase9studios.com/files/torque/files/Movie1.wmv


Im using the lighting pack and the realm wars melee code.
I have made no other changes to the engine.

#1
05/10/2005 (9:38 pm)
Lol
well i just copied all my scripts over to stock TGE (and made a few edits) and the AIplayer seems to follow right.
Well everything seems to act right with the exception of my player being able to fly when i hold down space.

I wonder if any of the changes that were made for the melee code had anything to do with it.
#2
05/10/2005 (10:26 pm)
I actually get this problem alot (the spin cycle effect), after having implemented melee, only I didn't use the RW melee code, only the models and animations. Interestingly, if I use the glowy model (or whatever the yellow dude from tutorial.base is called), I do not have this problem, I am guessing then that it's a problem with the eye vector in the RW Orc.
#3
05/11/2005 (9:23 am)
Well when I get home today, I'm going to use the starter.fps to do testing because if I use my whole project I get a few bugs like the player flying and badguy not falling to the ground after being spawned. Ill just use the little bit of script I have to spawn a badguy, search for the players, follow and look at them.

Ill try both the rw model and the standard orc. Then try it again in the lighting pack version, then again in mine. Hopefully this will tell me where the issue is at. Its still my hunch that its in the RW melee code I'm using, but I need to be 100% sure first.
#4
05/11/2005 (5:42 pm)
Ya i replaced the model and the prob was solved.