I have an object that points in the direction of another object (i.e. it rotates to the direction that the second objects x and y coordinates are at) below is the code I use.
var distx = target.x - x;
var disty = target.y - y;
var angle:Number = Math.atan2(disty, distx);
var vx:Number = Math.cos(angle) * cspeed;
var vy:Number = Math.sin(angle) * cspeed;
rotation = angle * 180/Math.PI;
x += vx;
y += vy;
as you can see. Not only does it rotate towards the target object, but it also moves towards it too. When I play the movie, the object instantly points to the targeted object and moves towards it.
I would like for it to slowly turn towards the object instead of instantly turning towards it. anyone know how to do this.