Hello all
I’m making a 2D side-scroller … really simple with paint-graphics.
Right now you can shoot “lazers” forward, but I’d like them to go after a mousePressed
So, I’ve made it work so far that I’ve got the mousePressed X and Y, now I want a angle so that I can change the y-position of the “lazor” (;D) after the angle, this is my approach showed with paint-skills:
http://u.snelhest.org/i/2011/02/05_292.JPG
This is how I would calculate the V on my calculator … Is there a function like the “tan-1” in Java? (I can’t seem to find any when googling)
If not - what to use?
Thanks for answers
And sorry if I choose the wrong forum section
//M