I need my enemies to "follow" my player when he walks by. In other words I need code to rotate the enemies towards my player.
I have tried:
angle=180-atan((enemyz-playerz)/(enemyx-playerx))
And I tried the atanfull function, but they don't work.
If anyone can explain me how it's done properly that would be nice.
As you can see the enemies don't have to look up or down, just rotate around the Y axis.
And I would also want to know if using a hidden pyramid as the enemy's field of view is a good and efficient idea.
Games don't kill ...
I do!
http://www.gamingzone.be the ultimate gaming community