Setting angle of Item
by JD Scogin · in Torque 3D Beginner · 08/25/2013 (11:19 am) · 4 replies
I have a zombie that will chase the player. He walks on top of the ground, has animation and will follow the player (trying to eat his brains). The only problem I have now, is that he is facing the wrong direction. I am using ArcTan to get the angleof the two coordinates, but I can't figure out how to adjust the zombie's angle (or rotation).
I tried updating zombie.rotation, but that seems to do nothing. Am I missing something? I used Item, so I could turn on gravity.
Thanks
Jd
I tried updating zombie.rotation, but that seems to do nothing. Am I missing something? I used Item, so I could turn on gravity.
Thanks
Jd
About the author
#2
08/25/2013 (1:56 pm)
Thanks, I will give that a try. I am not using the AIPlayer class, because when I create New a datablock, that is not one of the selections. I think that might be what I need.ThanksJd
#3
08/26/2013 (7:10 am)
Thanks to you Lukas, I now have a zombie AI player that chases the player and always points in his direction. The aimat works great. So now I have all the AIPlayer functions to use.The steps to do this are not evident. When I get everything working, I will write a quick tutorial on how I did it. Thanks again! What I plan for this game is zombies will chase you until you find the vehicle (cheetah) and then you can run over them.
#4
Maybe you can find something useful in my tangled mess.... Perhaps the main thing is that it helps to show how to expand the AI "system." As you say, it's not very evident how to proceed from the starting scripts.
08/26/2013 (10:17 am)
https://github.com/RichardRanft/AITutorialMaybe you can find something useful in my tangled mess.... Perhaps the main thing is that it helps to show how to expand the AI "system." As you say, it's not very evident how to proceed from the starting scripts.
Torque Owner Lukas Joergensen
WinterLeaf Entertainment