How do I Make a Eye on an Enemy that will follow you?

0 favourites
  • 3 posts
From the Asset Store
Fully animated four directional eye monster game asset
  • Hey, I just want to make like an Eye on a Enemy Follow the Player, no matter if The Player is up in the air or down below or whatever. I want to make it that The Enemy would shoot A Laser out of its eye.

    So how do you make an eye of a enemy that follows the Player?

  • I would use two sprites, one for the enemy, one for the eye.

    You can pin the eye sprite to the enemy sprite so that they move together.

    The eye sprite should be slightly off center from its origin point.

    Every tick, set the angle of the eye sprite towards the player. You can get this angle by using the expression angle(eye.x,eye.y,player.x,player.y)

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • I would use two sprites, one for the enemy, one for the eye.

    You can pin the eye sprite to the enemy sprite so that they move together.

    The eye sprite should be slightly off center from its origin point.

    Every tick, set the angle of the eye sprite towards the player. You can get this angle by using the expression angle(eye.x,eye.y,player.x,player.y)

    Thanks, I'll try it!

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)