• 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 dawndil · Jan 09, 2013 at 09:36 AM · projectile

How to move object parabolic projectile path

I need to transform a sphere in a parabolic projectile path. I know the height and distance the projectile should go. I don't know the velocity and projection angle. Is there a sample code showing how to do this?

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

3 Replies

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

Answer by AlucardJay · Jan 09, 2013 at 10:23 AM

Aldo does great answers on this, to questions usually under the title cannonball! Here are some links for you to check out. Although they are physics-based, you can use the equations or study the techniques to achieve this :

http://answers.unity3d.com/questions/148399/shooting-a-cannonball.html

http://answers.unity3d.com/questions/248788/calculating-ball-trajectory-in-full-3d-world.html

http://answers.unity3d.com/questions/145972/how-to-make-enemy-canon-ball-fall-on-mooving-targe.html

http://answers.unity3d.com/questions/296749/display-arc-for-cannons-ball-trajectory.html

Comment
Add comment · 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
2

Answer by Swati Patel · Apr 30, 2014 at 04:42 AM

try this I hope it will help you http://www.theappguruz.com/tutorial/display-projectile-trajectory-path-in-unity/#more-601

Comment
Add comment · 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
3

Answer by JoeStrout · Sep 01, 2016 at 07:07 PM

I also wrote a blog post on this topic. It shows code that adds an arc (using the parabolic equation) to otherwise straight motion. It also shows how to make your sprite point in the direction it's going (in case it's something like an arrow, not round like a cannonball).

http://luminaryapps.com/blog/arcing-projectiles-in-unity/

I hope this proves useful to somebody!

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 kenwrotethis · Nov 30, 2016 at 10:24 PM 1
Share

This is very helpful, thank you.

avatar image vudinhhau0601 kenwrotethis · Mar 05, 2018 at 03:43 AM 0
Share

$$anonymous$$enworotethis website is faulty. Hope you save somewhere. If you can share it for yourself? I'm in need :(

avatar image wantaname03 · Mar 04, 2018 at 04:54 PM 0
Share

JoeStrout website is faulty. Hope you save somewhere. If you can share it for yourself? I'm in need :(

avatar image JoeStrout · Mar 05, 2018 at 03:29 PM 1
Share

Apologies to all for the broken link. I've corrected it now.

avatar image betaFlux JoeStrout · Dec 21, 2019 at 10:43 PM 1
Share

Hi Joe, it's been a while now but I hope you can help me. I assume the parabolic code on your website is meant to be used in 2D. Problem is I can't figure out how to change the code so it works in 3D on moving targets.

I hope you or someone else can help me.

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

16 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

Related Questions

Game Object not destroying using findwithgametag 2 Answers

Shooting extra arrows at an angle from the first 1 Answer

5 seconds after i hit play a projectile that hasnt been triggered launches and removes the tilemap, HELP 2 Answers

Boomerang projectile doesn't return to player if the player has moved 1 Answer

Photon Unity Networking - Projectile Syncing problem 0 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