Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 14 Next capture
2021 2022 2023
2 captures
12 Jun 22 - 14 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 sandworm · Sep 06, 2011 at 05:13 PM · rigidbodyvelocityangleprojectiletrajectory

Increase velocity without changing trajectory

I have a rigidbody that has been launched high into the air. I've calculated the exact angle needed to hit a specific target on a distant battlefield, and it works perfectly. Now, however, I have been told to increase its velocity as it nears the ground. Is there a way to increase speed on the rigidbody without messing up the trajectory? The calculation for the trajectory is quite complex, and would be very difficult to modify directly for a sliding velocity.

Thanks! The equation I'm using is below:

 float sqrt = (v * v * v * v) - (g * (g * (x * x) + 2 * y * (v * v)));
 float theta1 = Mathf.Atan(((v * v) + Mathf.Sqrt(sqrt)) / (g * x));
Comment
Add comment · Show 2
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 Waz · Sep 06, 2011 at 05:22 PM 0
Share

Is the increased speed just for aesthetic reasons, or is is supposed to model some real physics (I can't think of any ballistic missile that has a rocket stage at the end!). I've answered assu$$anonymous$$g it's aesthetics.

avatar image sandworm · Sep 06, 2011 at 08:40 PM 0
Share

Aesthetics. It just takes too long to get to its target the way it is now.

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by Waz · Sep 06, 2011 at 05:19 PM

If you increase gravity, both g and the actual gravity in the game (or just as applied to the projectile), you will get a higher overall speed.

Comment
Add comment · Show 4 · 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 sandworm · Sep 06, 2011 at 05:23 PM 0
Share

Wouldn't that skew the parabolic arc?

avatar image Waz · Sep 06, 2011 at 05:25 PM 0
Share

Not if you change both gravity and the calculation taking gravity into account (I.e. g in you equation).

avatar image sandworm · Sep 06, 2011 at 08:40 PM 0
Share

Any idea how I would go about that? It might not be the best idea though, since there may be multiple projectiles aloft simultaneously.

avatar image Waz · Sep 06, 2011 at 10:43 PM 0
Share

You have g in your equation. Physics gravity is set in Project Settings - Physics.

Believe me, it will work.

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

3 People are following this question.

avatar image avatar image avatar image

Related Questions

Projectile launch insufficient velocity 2 Answers

Getting startangle for projectile 1 Answer

How to find cannon elevation angle to fire a projectile to known range? 1 Answer

Controll 3D Rigidbody Projectile with Joystick 1 Answer

ball breaks through walls 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