Need Help.. facing enemy-actor to player-actor in 8 different directions
-I created a player and enemy actor,
-the enemy actor will chase my player.
Note: I have 8 Different pictures of my enemy(pictures = image in 8 different angle)
The Question is how can i set my enemy image in 8way direction?
i want my enemy-actor to face my player-actor in 8way direction?
Comments
@rainhasntstop Perhaps you could make a rule (or 8) that would change the image based on the orientation of the actor?
Would it be easier to make the enemy rotate towards the player as seen in my platform template v1 below @ 0:40 ?
@DeepBlueApps i wont use rotation towards because i want my enemy-actor to be more static when switching to another image
i need 8way angles only, not in all angles..
up,rightup,left,leftdown,down,rightdown,left,leftup..
@rainhasntstop ok...
if self.rotation=0
change image
if self.rotation=45
change image
if self.rotation=90
change image
etc.
@Summation thanks for info.
ill give it a try
honestly i just want to minimize my code, and look for different way,
because i got lags when i spawned 100 enemies
DBA, that's a pretty awesome template. I want it.
@DeepBlueApps ist free?
You can take a look at our 8 way joystick template (free) as it might help with the angles.
http://www.deepblueapps.com/8-way-controller-template/
@DeepBlueApps any other way? i already tried that type of code, but still got a bit of lags when i spawned morethan 100 enemy, i think its because every single enemy-actor have constrain x,and y position