0
\$\begingroup\$

I am not really good in math but I did like to learn as much as I can so recently I was playing with Unity physics and enjoy it but I did stop a little because I need to "cheat" on speed sometimes so I did use this amazing lesson on youtube: https://www.youtube.com/watch?v=Dc34eSc8kPA I did menage to do the script for motion of my projectile correctly and hitting the target at any difference of height, now but it only work on the Z axis, what I should do if I want to shoot a target on X-Z horizontal coordination with custom height Y ? for the motion I used the function for horizontal and vertical motion: Y = Yo + Voy*t -0.5*gt^2 X = Xo + Voxt -0.5*a*t^2 where on my side the a is 0 Vox e Voy are the components of the initial speed on x and y I menage to calculate but how to translate then on the Z axis ? Thank you for anyone who will try to help me out.

\$\endgroup\$