Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 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 MD_Reptile · Jun 17, 2013 at 09:22 AM · rigidbodywindairaerodynamics

Rigidbody being affected by wind resistance - and wind!

Im working on a old project I had lying around where you just launch rockets and they come back down... and thats it. Heres webplayer: https://dl.dropboxusercontent.com/u/76853021/RocketGameWebPlayer/WebPlayerDemo.html

I was sort of halfway faking wind, by adding some randomish wind forces after launching, to make each launch a little different yaknow.

But watching a few launches I am noticing, I need wind resistance to work right, because my rocket reaches the peak of its launch, where it should be flipping over its center of mass, and pointing downwards from its aerodynamic shape hitting the wind resistance. How can I do this in unity? or how can I fake it good :D

Here is a little image to describe my desired effect: http://img844.imageshack.us/img844/9537/uwt.png

Comment
Add comment · Show 12
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 MD_Reptile · Jun 17, 2013 at 09:34 AM 0
Share

ID$$anonymous$$ if this might be what I need, but I will look into this tomorrow, and if it works for me I'll post what I get going

http://answers.unity3d.com/questions/18853/Basic-aerodynamics-questions.html

avatar image roberto_sc · Jun 17, 2013 at 11:11 AM 1
Share

the center of mass moves towards the tip as the rocket burns fuel. If you look for wind in the literature you won't find what you need: wind simulation in aeronautics is really the wind that hits the rocket in some arbitrary direction and doesn't change often, but what makes your rocket behave like you want is not the wind, is the center of mass, the location of the rocket force and the forces exert from the control of the "wings".

avatar image MD_Reptile · Jun 17, 2013 at 08:59 PM 0
Share

then maybe scripting a change in the center of mass would cause this effect? hmmm, I will mess around with this, I had been trying to just change the mass for the entire playtime, but thinking now, your right that might just be what I need.

EDIT: seems that changing the center of mass of my object at runtime doesnt flip it when hitting the peak of the launch, or at all :/

I tried making it heavier with more thrust power, more drag... nothing seems to help!

I tried: transform.LookAt(transform.position + rigidbody.velocity);

but that just causes it to look really really fake, but almost looks like I need it too, but screws up physics effecting the rigidbody as well...

avatar image robertbu · Jun 17, 2013 at 09:07 PM 0
Share

To improve (but not completely fix) the situation add this to the LateUpdate() of the rocket:

 if (rigidbody.velocity != Vector3.zero)
   transform.rotation = Quaternion.LookRotation(rigidbody.velocity);

It will work better if your rocket is launched at a bit of an angle.

avatar image MD_Reptile · Jun 17, 2013 at 09:31 PM 0
Share

thats what I had just tried (well transform.LookAt...) but I will give this a try anyway, ill report back in a few...

EDIT well sort of would work, buy doesnt "look" with the "up" of my rocket properly, ins$$anonymous$$d shoots off to the side ins$$anonymous$$d of looking with the tip of the rocket (the "front" of the rocket is the side, which is what "looks" at the target)... ill look into this further to see if I can get that working better...

Show more comments

0 Replies

· Add your reply
  • Sort: 

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

15 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

Related Questions

How can I give an object realistic wind? 0 Answers

Directional Explosion 1 Answer

Rigidbodies flying up in the air on collision 4 Answers

How would you code a Wind script? 1 Answer

Add a wind vector to local velocity for calculating wind speed 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