Hi Guys,
I’ve been working on some missile following the mouse code, i managed to make the missile to follow the mouse, what i hope to achieve now is to change the angle of the missile entity image to point toward the direction of the mouse, i tried to change the Image.angle but it didn’t seem to work this is what i managed to do so far :
override public function update():void
{
super.update();
var angle:int = FP.angle(x, y, world.mouseX, world.mouseY)
x += SPEED * Math.cos(angle * FP.RAD) * FP.elapsed
y += SPEED * Math.sin(angle * FP.RAD) * FP.elapsed
image.angle = angle; // not working
}