Arrow flight

Monkey Forums/Monkey Programming/Arrow flight

cgrossi(Posted 2016) [#1]
Hello, guys.

I'm making a 2D battle board game where I have an archer that can shoot an arrow at all four direction (up, down, left, right). Knowing the starting and ending points how can I make an arc with this arrow?

Sample: https://drive.google.com/open?id=0B8T1s0TV53yeQnh5QjlyYlhRVkE

Regards
Cristiano


muddy_shoes(Posted 2016) [#2]
Depends what sort of visual effect you want, the image/graphic style you're using, whether you want the flight to have varying arcs for different distances etc. I'd probably just start with tweening/interpolating the angle and position of the arrow image. That method will be easy to adjust to handle variations and things like framerate issues.


Gerry Quinn(Posted 2016) [#3]
Is it isometric? The image doesn't look right.

For me a starting point would be to make a parabola in 3D space - it would be easy to parametrise to a 2D position in isometric space, if that's what you're doing.


cgrossi(Posted 2016) [#4]
Hello.

Thank you all, I had already done what I wanted. If any doubts come up again, I ask for you!!

Thank you very much!
Cristiano