Skip to main content
GameDev.net gamedev.net
🔒 Locked

3D Bullet Prediction

Started by thenoobie Jul 7, 2011 at 12:20 AM 0 replies 2.4k views
Original Post
thenoobie
thenoobie
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?
alvaro
alvaro
Search the forums for "target leading". Post again if you don't find what you are looking for.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.