Hi I got a code for an enemy, which allows him to turn himself always where the player is. My question is: How can I change the code, so that the enemy will not turn up when I jump. I just want that he only turns into horizontal direction of the player not additionally into vertical.
Here is my code snippet that I use:
vec_set(temp, player.x);
vec_sub(temp,my.x);
vec_to_angle(my.pan, temp); // Turn towards player