Ok so I wish to make a 2D defending game where you control a archer or ballista and fire at incoming units. But for the aiming it would be really useful for some kind of guide that shows you approx where the projectile would go more or less, something like this
So before you even have shot you can see kinda where its going to land
Whats the "best" method for this? At least any method...?
jag_e_nummer_ett wrote:Ok so I wish to make a 2D defending game where you control a archer or ballista and fire at incoming units. But for the aiming it would be really useful for some kind of guide that shows you approx where the projectile would go more or less, something like this
So before you even have shot you can see kinda where its going to land
Whats the "best" method for this? At least any method...?
That depends a bit on how you made the bullet. Also you should post questions and "help me" stuff in the "Support and Development" Sub forum and not in "General".
Jeeper wrote:
That depends a bit on how you made the bullet. Also you should post questions and "help me" stuff in the "Support and Development" Sub forum and not in "General".
the projectiles will vary in speed, damage, and size/design, but i think only speed is relevant to this question.
sorry forgot about that, is there a way to move it or do i remake it?
Somewhere in your code you have a function that simulates the bullet for one frame (with dt). Put this into a loop (within one frame) to simulate multiple frames. That way you can for example predict the position of the bullet after one second, after two seconds and so on. Use these points to draw a line.
micha wrote:Somewhere in your code you have a function that simulates the bullet for one frame (with dt). Put this into a loop (within one frame) to simulate multiple frames. That way you can for example predict the position of the bullet after one second, after two seconds and so on. Use these points to draw a line.