I'm having a hard time wrapping my brain around how to code shooting an arrow with an arc. There have been plenty of tutorials for how to do this in 2d, but I haven't found one that explains for 3d and I can't figure out how to translate between the two in this case.
I have the attacker and the target's translations. My current version uses moveandcollide
The attacker instances a kinematic arrow (don't know which physics body to use) and should pass it the initial angle. The arrow has an initial force(?) or velocity vector.
I can't figure out how to calculate the initial angle in 3d. Including the possibility of differing heights.
I also know that there should be 2 possible angles as well. I'd also like the arrow to point in the direction of travel, which again is a 3d angle I can't figure out.
This is my first 3d project using physics so I'm pretty much in the dark on this one and frustrated that this shouldn't be terribly difficult math. It's just that I've forgotten it all.
Any assistance would be greatly appreciated.