i have a MC that rotates around in a circle towards where the mouse is pointing but im trying to make it so it doesnt just go directly to point the mouse is pointing but instead moves at a certaint speed, heres my code:
var radius:Number = 50;
//The radius of the circle
var centerX:Number = 200;
//The center X position of the circle
var centerY:Number = 200;
//The center Y position of the circle
var toMouse:Boolean = false;
var ang:Number = Math.atan2(centerY-game.mouseY, centerX-game.mouseX);
//Rotate depending on mouse location
this.x = centerX+(Math.cos(ang)*radius)*(toMouse ? 1 : -1);
//Move along the X
this.y = centerY+(Math.sin(ang)*radius)*(toMouse ? 1 : -1);
//Move along the Y
any help is appreciated, thanks!