• 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
1
Question by Dot45 · Nov 24, 2010 at 07:48 PM · physicsbullettrajectory

realistic bullet trajectory

Hi I'm trying to simulate bullet trajectory like in "Sniper Ghost Warrior" game

for example: 5.56*45 mm caliber has 60 grains(0.003887935 kg) and velocity is 3100 feet per second(944.88 meters per second)

(data from http://home.comcast.net/~stephentmon...Comparison.txt)

problem:

1.I have set rigidbody to a sphere (for testing still not have bullet model), set its mass to 0.003887935 how much drag i should set?

2.Which one should i use; rigidbody.velocity , rigidbody.Addforce or rigidbody.AddForceAtPosition and what ForceMode?

3.assume that i fired a bullet in Vector(0,0,933) and another wind vector come from right side assume (-X,0,0), i want the direction of bullet changed by the force of wind. how do i perform this????

ps.If you have greater idea please tell me.

sorry for bad English

Comment
Add comment · Show 1
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 VS48 · Nov 24, 2010 at 08:01 PM 1
Share

I would not use the physics engine to simulate the bullet trajectory, it is not designed for these low-mass, high-velocity calculations. Ins$$anonymous$$d, calculate the trajectory yourself and manually position your bullet.

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by AdamEstone · Sep 21, 2011 at 09:14 PM

  1. Don't use a ridgedbody to shoot with!It makes problems collider because it is too fast!

Use the Raycast commands to define: hitpoint, distance, check for tag's and ect. 2. Go to THIS Youtube page/video. Look at the end of it, and you will see how the Raycast is done.

  1. I dont know :/

Hope it gave you a kick.

-LoLypopboy.

Comment
Add comment · Show 5 · 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 syclamoth · Sep 21, 2011 at 11:48 PM 0
Share

Well, the OP specifically doesn't want to to this, because they need to have super-accurate bullet physics for their game. Also, this is some serious necromancy you're doing here! This question is from almost a year ago.

avatar image sacredgeometry · Sep 22, 2011 at 11:03 AM 0
Share

I think the way LOL_ypop_boy is the way to do it, do the maths calculations based on real world physics maths with a realistic range in the variables and the raycast information of the scene.

avatar image syclamoth · Sep 22, 2011 at 11:41 AM 0
Share

Yes, but sakamotomiwa specifically wanted a bullet which has a definite curving trajectory- a straight raycast is definitely not this! Raycasts are hardly physics simulations- the fact that they are performed with the Physics class in unity is purely coincidence.

avatar image sacredgeometry · Sep 22, 2011 at 11:48 AM 0
Share

You can define a curve from the information you get from raycast.

avatar image sacredgeometry · Sep 22, 2011 at 11:49 AM 0
Share

http://en.wikipedia.org/wiki/Trajectory

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.

Welcome to Unity Answers

The best place to ask and answer questions about development with Unity.

To help users navigate the site we have posted a site navigation guide.

If you are a new user to Unity Answers, check out our FAQ for more information.

Make sure to check out our Knowledge Base for commonly asked Unity questions.

If you are a moderator, see our Moderator Guidelines page.

We are making improvements to UA, see the list of changes.



Follow this Question

Answers Answers and Comments

3 People are following this question.

avatar image avatar image avatar image

Related Questions

Calculating 3D Physics Prediction of Shot Direction with Moving target and moving gun (inertia) 1 Answer

Calculate force applied to rigidbody to make it land at specific location 2 Answers

Drawn trajectory different than real trajectory 2 Answers

Show trajectory of a bouncing ball 0 Answers

how to predict physics trajectory of a sphere 2 Answers


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