0
\$\begingroup\$

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 :)

\$\endgroup\$
  • \$\begingroup\$ In the future, do not re-post closed questions. Edit the question to add clarifying details. \$\endgroup\$ – user1430 Oct 7 '14 at 21:02
  • \$\begingroup\$ Josh Petrie this is not the same question this question is in 3d space and is more specific about what I want. \$\endgroup\$ – ProWolf Oct 7 '14 at 21:23
  • \$\begingroup\$ That's why I said you should edit the original question to provide that increased specificity. \$\endgroup\$ – user1430 Oct 7 '14 at 21:25