- #1
rcrumb
- 6
- 0
Hi,
Im currently working on a video game, and have come to an aspect that I'm very unsure about (I'm self taught in most of my game physics knowledge, so there are quite a few gaps). Let's say there is an environment with no features that act on objects except for gravity (or simply no wind resistance). I am shooting a cannonball from a specific x,y,z coordinate, and am trying to hit another x,y,z coordinate. The cannon is going to be at a consistent angle (lets say 45 degrees). Is there an equation that i could use, where starting from one x,y,z location, i could calculate the rotation, velocity, and gravity to hit the exact other x,y,z location? Is this calculation possible, or will I always get "just very close" to the ending x,y,z location?
Thanks.
Im currently working on a video game, and have come to an aspect that I'm very unsure about (I'm self taught in most of my game physics knowledge, so there are quite a few gaps). Let's say there is an environment with no features that act on objects except for gravity (or simply no wind resistance). I am shooting a cannonball from a specific x,y,z coordinate, and am trying to hit another x,y,z coordinate. The cannon is going to be at a consistent angle (lets say 45 degrees). Is there an equation that i could use, where starting from one x,y,z location, i could calculate the rotation, velocity, and gravity to hit the exact other x,y,z location? Is this calculation possible, or will I always get "just very close" to the ending x,y,z location?
Thanks.