Original Post
I'm looking for an algorithm to calculate where the bots should shoot their guns toward with projectile type bullets (non-instant.) The game is full 3D and I have the X, Y, Z (Vector) positions of the bots and the players. I also have the bullets speed, the distance between the two units (basic math), the vector speed of both units (how fast are they moving X, Y and Z.)
I thought this would be fairly simple but I'm having a hell of a time finding a good algorithm and this is definitely more of a math/physics problem than a programming problem. I know I need to calculate how long the bullet will take to reach the target (T) and then calculate where the target will be in (T) ms of time based on his acceleration/direction and finally set the bots viewangles to that position. Anyone got some help?
I thought this would be fairly simple but I'm having a hell of a time finding a good algorithm and this is definitely more of a math/physics problem than a programming problem. I know I need to calculate how long the bullet will take to reach the target (T) and then calculate where the target will be in (T) ms of time based on his acceleration/direction and finally set the bots viewangles to that position. Anyone got some help?