Firstly, apologies if this has been placed in the wrong section, I have considered putting this in the scripting forum, but strictly, code isn’t involved yet, I feel this is more a design feature…
I am firing a projectile into the air. Each ‘fire’ will have a different 3D velocity… I need to estimate where the projectile will land…
My thoughts on a possible way to do this…
upon ‘fire’, a function will return a vector 3 representing the point at which the projectile will land…
To do this, it will register the Vector3 at which it is fired and store it…
The next frame, we will again measure the Vector3 of the projectile… and calculate how much it has moved by means of the difference… Using this ‘Difference Vector3’ we can estimate where it will land…
We will need a formula to place this ‘Difference Vector3’ into…
Thoughts? It might be better to use a bigger time-gap for the difference?
Anyone had any success with this sort of thing? Or know a good resource to learn about it?
Nope. That’s a scripting question, not a design question.
Related design questions would be things like:
How does firing a projectile into the air impact the game play?
Should I show players where the projectile is going to land while they are aiming?
Would the game be more/less fun if you had to fire two projectiles at once?
Should my projectile-firing game be turn-based or real-time?
What design lessons can we learn from great projectile-firing games of the past?
But as soon as you’ve decided what you want to do, and you’re wondering how to do it, that’s no longer a design question.
Had you posted in the Scripting forum, I would point out that what you’re describing is classic Euler integration, and that you might want to start with this article about it. But since this is the Design forum, I won’t.
We also wouldn’t give them jellybeans. Like these jellybeans. They were pooped by the Easter Bunny.
TL;DR - Every time a newbie posts a question in the wrong place and you help them, you’re feeding them jellybeans pooped by the Easter Bunny. Don’t feed newbies jellybeans pooped by the Easter Bunny!