ForumsProgramming ForumEnemy Rotation

1 3188
LennonTheMage
offline
LennonTheMage
55 posts
Nomad

Ok so I have my character. And I have my enemy. I need my enemy to face the direction towards my character.

~Thanks!

  • 1 Reply
AbnormalIdiot
offline
AbnormalIdiot
110 posts
Nomad

Use this code on the enemy:

_rotation = Math.atan2(_root.character._y - _y, _root.character._x - _x)*180/Math.PI;

Showing 1-1 of 1