# Missile tracking problems

**URL:** <https://forum.kirupa.com/t/missile-tracking-problems/178006>\
**Category:** Uncategorized\
**Created:** [February 7, 2006, 3:17am UTC](https://forum.kirupa.com/t/missile-tracking-problems/178006 "2006-02-07T03:17:54Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![zicemaster](https://avatars.discourse-cdn.com/v4/letter/z/b77776/32.png) [@zicemaster](https://forum.kirupa.com/u/zicemaster)\
**Post date:** [February 7, 2006, 3:17am UTC](https://forum.kirupa.com/t/missile-tracking-problems/178006/1 "2006-02-07T03:17:54Z")

</div>

Okay, this works and makes the rocket point toward the mouse.

```auto

            mouseDirection = rotation2D(Math.atan2(gMouse.y-_y, gMouse.x-_x))*180/Math.PI;
            //_rotation = mouseDirection; <This works Perfectly, but no easing...

//My failing attempts at easing...
            Radians = _rotation*Math.PI/180;
            _x += Math.sin(Radians)*5;
            _y -= Math.cos(Radians)*5;

//ANother...

            _x -= _root.rocketSpeed*Math.cos(mouseDirection*Math.PI/180);
            _y -= _root.rocketSpeed*Math.sin(mouseDirection*Math.PI/180);
 

```
