Game Development Community

Reading animated objects new position

by Faraz Ahmed · in Torque Game Engine · 07/20/2006 (6:21 am) · 1 replies

Hi, I'm running into a problem reading an AIPlayer's (and its mounts) new position once I call setActionThread on them.

I have an AI player with a collision mesh (invisible dts) mounted on the baseball bat that he is carrying. My animation makes him step to the left and swing the bat. But when I call getPosition() on both the invisible collision dts and the player, I keep getting the original values as if neither has moved. Whats confusing me is that the engine does correcly trigger the collision against the bat at the new position but is returning stagnant values when I call getPosition() as if nothing has moved.

I tried using both calls setActionThread("StrikeLeft", true, true) and setActionThread("StrikeLeft", true, false). In both cases the server detects the collision as if the player has actually moved but returns original position values as if the player is in idle mode. Totally lost here... can anyone shed some light!

Thanks

#1
07/20/2006 (6:31 am)
The Animation wont make the DTS move in the world... What you would need to do is create the animation on 1 spot. Look at the Show Tool at the strafe or run animation. Kork is not actually moving. You need to do the same with your and make the dts move seperately in code or script.

Hope that makes sense...