• 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
9
Question by yetanotherday · May 06, 2012 at 02:07 AM · shootingballtrajectorythrow

Calculating ball trajectory in full 3d world

Hello

We have quite common problem but we couldn’t figure out any working solution any that fits (all of those bits of code we found on unity forums doesn’t tell us much because we are not programmers). If that’s possible we prefer code in javascript.

Our situation:

  1. Players character is grenadier in full 3d world (he can jump and walk on different levels of high)

  2. Players sees that character as third person from isometric-like point of view (similar to most crpg games like Diablo)

  3. In any time player can throw grenade to any place within range by clicking mouse button on the ground

  4. We know how to find coordinates of player and that click on the ground

    Our problem:

  5.  We don’t know how to calculate the trajectory of thrown grenade in 3d world. Grenade should start from characters position and ends on the clicked ground (right now its misses badly).
    
  6.  We would like to have control over speed, angle and distance in which player can throw grenade.
    

This doesn’t have to be 100% precise , we prefer something that works and works really fast.

Image for better understanding our problem:

alt text

Those two clips can show you what we searching for:

http://www.vimeo.com/8900520 – this one have something we are looking for

http://www.youtube.com/watch?v=kNabvLyUXzI#t=0m32s - here is “feel” of throw we are looking for

Thanks SO much!

trajectory.jpg (21.4 kB)
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

8 Replies

· Add your reply
  • Sort: 
avatar image
0

Answer by GdeCarpentier · Mar 31, 2015 at 10:18 AM

Hi. I you want slightly more control and include drag/wind, you could also use this: http://forum.unity3d.com/threads/script-library-demo-for-planning-ballistic-projectiles-with-air-resitance-free.314236/. It's in c# though. in short: it's internally still using a predefined type of curve which is slightly more advanced than a parabola, but with more physical accuracy and influences.

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
0

Answer by unity_YQaA25k7WVR9Pg · Jul 01, 2020 at 11:40 AM

Where is the test of the question and answers? Is that a bug in the website or something ?

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
0

Answer by LeleUnity · Sep 14, 2020 at 03:11 PM

why comments are all invisible?

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
  • ‹
  • 1
  • 2

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

28 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 avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Show trajectory of a bouncing ball 0 Answers

How to predict where the ball will land after being hit by bat? 4 Answers

Can i make a bullet spawn and follow a designed path via animation 0 Answers

Ball not throw proper direction unity3d? 0 Answers

Throw a ball in target bucket with swipe but with one drop Unity3D 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