Ok, my head isn’t working so it would be faster if someone justs helps me/double checks my trig.
I have a point at 300,300 or whatever, and I’m trying to find the points 100px away at any given angle… Say at angle 0
X is source, x is target 100 px away
ActionScript Code:
[FONT=Courier New][LEFT]|||||||||||||||||||||||
[FONT=Courier New]|||||||||||||||||||||||[/FONT]
[FONT=Courier New]|||||||||[/FONT]X[FONT=Courier New]|||||||||||[/FONT]x|
||||COLOR=#000000||||||||||
[FONT=Courier New]|||||||||||||||||||||||[/FONT]
[FONT=Courier New]|||||||||||||||||||||||[/FONT]
[/LEFT]
[/FONT]
0 degree angle so ------ (400,300) is 100 px away
However
Say that the point is 100 px away at a 23 degree angle
ActionScript Code:
[FONT=Courier New][LEFT][FONT=Courier New]|||||||||||||||||||||||[/FONT]
[FONT=Courier New]||||||||||||||||||||[/FONT]x||
[FONT=Courier New]|||||||||||X|||||||||||[/FONT]
|||||||COLOR=#000000|||||||
[/COLOR][FONT=Courier New]|||||||||||||||||||||||[/FONT]
[FONT=Courier New]|||||||||||||||||||||||[/FONT]
[/LEFT]
[/FONT]
My brain isn’t working, it’s night time and I need to implement it before tomorrow… So what actionscript function could I use to find the target pixels 100 pixels away at any given degree. I don’t mind writing a function like target(300,300,23,100) but I rather use a function or what not. It’s basically a point at an angle, with a given radius. The only thing it needs to be is fast/optimized, so I’m cautious about writing > 10 lines of code.
Sorry if my message is incoherent, I’m half awake at this point…