- Home /
How do I predict where a bullet will hit?
Hello folks,
I am planning on doing a game just like Sniper Elite V2. Where the gravity and the wind influence the projectile path. At the beginning the wind is optional, but I really would like to know where the bullet will hit, so I can follow the bullet in slow motion. Is there a way to predict the path and see where it ends or something like this?
Thank you!
Answer by MicroGSD · Aug 07, 2013 at 09:01 PM
Two options:
Fire a fake bullet which won't collide right before the real one, and use that as the prediction. Both use aerodynamic resistance etc.
You can still follow the bullet in real-time slowed down, without the need for a prediction path.
Thank you, this seems to be a good solution for rapid fire. I will try other solutions for less realistic bullets!
Answer by conconexplosion · Aug 07, 2013 at 09:11 PM
well some guns shoot flatter than others... the ballistics are up to you.. if your using a certain rifle that may be in real life just look up the ballistics to find out the bullet drop(Gravity). as for the slow motion part.... im pretty new to unity but i think cameras may be able to do the job... maybe having the camera positioned on it and scripting it to follow the bullet. hope this helps.
Yes, put a camera in the bullet should be easier to follow.
Answer by conconexplosion · Aug 07, 2013 at 09:01 PM
either make up your own ballistics or search on Google for that particular rifles ballistics.... bullet drop(gravity) i don't know why you wouldn't know where the bullet would hit.... if you have wrote some scripts for this you should know the distance the wind pushes the bullet (right or left) the only thing i would know to do is just make a target somewhere in your scene and try to figure it out.... XD
Basically, I am not using any usual rifles, what I am trying to do is a basic study about prediction, for future uses. Now I'm just adding forces to bullets whenever I hit the button. I didn't think it would be so complex.
Answer by Owen-Reynolds · Aug 07, 2013 at 09:47 PM
I'd say get some source material. I liked "HOGs in the Shadows: Combat Stories from Marine Snipers in Iraq." Lots of no-frills stories about how it works. But no matter what, never underestimate the importance of research.
Short version: estimating ranges, wind and humidity are a big part of sniping. The rest is guessing when the guy is done moving. And you don't see the bullet. You just shoot and a tiny bit later either see a dust puff or see the guy fall.
If you decide you do want a "realistic" sniper sim then as conconex notes, it will be all math figuring out where it goes, not Unity physics.
You are right, It is very important. But as I said in another comment, I am making studies, so basically adding forces to spheres like it was bullets.