• 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 Niven · Feb 06, 2010 at 08:43 AM · physics

How to shoot a bullet in a trajectory for a sniper gun.

Basically the straight line approach that I am using at the moment just is not realistic for sniper shooting. How would I go about shooting a bullet that would say travel over 1000 metres and drop accordingly.

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

2 Replies

· Add your reply
  • Sort: 
avatar image
3
Best Answer

Answer by Ende · Feb 06, 2010 at 08:53 AM

Well after only using Unity for a week and not being a great programmer the actual implementation in Unity is something I think someone else will answer far better than me. What I can tell you though is that I am trying to do a similar thing and I have found the following which were useful.

http://www.hornady.com/ballistics-resource

http://www.globalsecurity.org/military/library/policy/army/fm/23-10/index.html

These sites give you the equations and theory that you need but they are not exactly simple ones mind.

As for implementation in Unity read here: http://unity3d.com/support/documentation/Components/class-Rigidbody.html

Comment
Add comment · Show 2 · 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 efge · Feb 06, 2010 at 09:59 PM 0
Share

Apply a TrailRenderer to the Rigidbodys and you get a tracer ammunition effect. Very nice :-)

avatar image burtonposey · Feb 07, 2010 at 05:14 AM 0
Share

I agree with Ende. If you need to factor in elements like wind, you can also use AddForce and AddTorque that are available in the RigidBody class.

avatar image
-1

Answer by Epic · May 30, 2010 at 06:52 PM

Sniper you say? Is it possible if you can give me the stuff needed for a zoom in? Ive made a assault rifle with a scope on the top. Not much point being there if you cant even zoom in. Much appreciated

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 3dDude · May 30, 2010 at 11:12 PM 0
Share

if you want to zoom you can change the fieldOfView of the camera

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

If you’re new to Unity Answers, please check our User Guide to help you navigate through our website and refer to our FAQ for more information.

Before posting, make sure to check out our Knowledge Base for commonly asked Unity questions.

Check our Moderator Guidelines if you’re a new moderator and want to work together in an effort to improve Unity Answers and support our users.

Follow this Question

Answers Answers and Comments

No one has followed this question yet.

Related Questions

2D 360 degress platformer example needed 0 Answers

Collision between player and a ball 1 Answer

Connecting SpringJoint2D to Rotating Rigidbody2D With Correct Anchor 0 Answers

isKinematic = true kicks in but physics keep on going for one animation loop. 1 Answer

Test to see if a Vector3 (point) is within a boxcollider. 5 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