I was trying to make a game with a bow and arrow using lwjgl but I couldent get the arch right. I have a function called projectile that is updated once a frame for each arrow. my frame cap is at 60 fps. the projectile function looks like this.
public static void projectile(Entity arrow, double speed, double gravity){
Vector3f position = arrow.getPosition();
float rotX = arrow.getRotX();
float rotY = arrow.getRotY();
float rotZ = arrow.getRotZ();
//code
return;
}
How can I use this function to move the arrow with it's speed and gravity along an arch. based on its rotation(for direction it moves in) and location. if you need more information please ask. thank you :)