hello, i wrote this in AS3 and was wondering if I could get help with this.
[code]
var angle:Number = Math.atan2(mouseX,mouseY-180)-Math.PI/2;
var xNew:Number = 20*Math.cos(angle);
var yNew:Number = -20*Math.sin(angle);[/code]
I tried this so far
local angle = Math.atan2(event.x,event.y-180)-Math.PI/2;
local xNew = 20\*Math.cos(angle);
local yNew = -20\*Math.sin(angle);
I am using event.x and event.y because this will be inside a function that fires on “touch”
Thanks! [import]uid: 6500 topic_id: 9735 reply_id: 309735[/import]