ActionScript: Orient an object to the mouse cursor

Share

How to orient an objet to an other ? Just put those lines and change the instance name myTank. 12345678910111213141516// This object will always look at the mouse cursor myTank.addEventListener(Event.ENTER_FRAME, tankEnterFrame); // This function will be launched every frame (25 times by seconds); function tankEnterFrame(pEvt) {   [...]

Posted on Saturday January 9th, 2010 at 06:17 PM by admin · Permalink · Leave a comment
Share

In: ActionScript3 as3, Game Design, Tip, Tutorial · Tagged with: , ,