Hi!
I've been lurking some time on the forums but today I encountered a problem which I simply can't seem to solve. I've looked at various sites explaining projectile trajectories in combination with gravity but I can't seem to get my code right.
What I am trying to figure out is the amount of time in seconds a projectile is traveling while completing its flight. I've seen all kinds of (hard to read) formula's and have concocted the following:
The angle is currently at 45 degrees but it should also accept negative degrees such as -10. Seaching for formula's which incorporate an initial velocity (which is probably what I need) all gave me a complete different formula than the one I have. I think I've got it for 99% but can't seem to find the last piece.
The sample might be a bit messy but it was just to figure out what kind of formula goes behind this all.
Thank you for your time!
I've been lurking some time on the forums but today I encountered a problem which I simply can't seem to solve. I've looked at various sites explaining projectile trajectories in combination with gravity but I can't seem to get my code right.
What I am trying to figure out is the amount of time in seconds a projectile is traveling while completing its flight. I've seen all kinds of (hard to read) formula's and have concocted the following:
The angle is currently at 45 degrees but it should also accept negative degrees such as -10. Seaching for formula's which incorporate an initial velocity (which is probably what I need) all gave me a complete different formula than the one I have. I think I've got it for 99% but can't seem to find the last piece.
The sample might be a bit messy but it was just to figure out what kind of formula goes behind this all.
Thank you for your time!