Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by hugamer_ · Aug 07, 2013 at 08:27 PM · gravitybulletpathprediction

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!

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

4 Replies

· Add your reply
  • Sort: 
avatar image
1

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.

Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image hugamer_ · Aug 14, 2013 at 05:25 PM 0
Share

Thank you, this seems to be a good solution for rapid fire. I will try other solutions for less realistic bullets!

avatar image
0

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.

Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image hugamer_ · Aug 14, 2013 at 05:28 PM 0
Share

Yes, put a camera in the bullet should be easier to follow.

avatar image
0

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

Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image hugamer_ · Aug 14, 2013 at 05:31 PM 0
Share

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.

avatar image
0

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.

Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image hugamer_ · Aug 14, 2013 at 05:32 PM 0
Share

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.

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

17 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Getting my bullet to move in a straight line 2 Answers

Simulating gravity to Raycast bullet 3 Answers

Network client side Prediction and gravity server-client different 1 Answer

Ray curve for bullet gravity effect, or any way to make it 1 Answer

Aim helper in realistic sniper game 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges