# AI rotating to face main character

**URL:** https://forum.kirupa.com/t/ai-rotating-to-face-main-character/251896
**Category:** programming
**Created:** [February 13, 2008, 6:02pm UTC](https://forum.kirupa.com/t/ai-rotating-to-face-main-character/251896 "2008-02-13T18:02:13Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Darth\_Turtle](https://avatars.discourse-cdn.com/v4/letter/d/22d042/32.png) [@Darth\_Turtle](https://forum.kirupa.com/u/Darth_Turtle)
#### Post date: [February 13, 2008, 6:02pm UTC](https://forum.kirupa.com/t/ai-rotating-to-face-main-character/251896/1 "2008-02-13T18:02:13Z")

</div>

What would the actionscript be on an movieclip called “enemy” so that it faces the main character called “gun”  
p.s. the main character is called gun ok i was too lazy to change it’s name.
