• 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 /
  • Help Room /
avatar image
Question by Der_Kevin · Dec 17, 2015 at 06:05 PM · rigidbodygravityaddforcespace

let rigidbody idle around in space

hey! i am working on a low gravity game: http://pixelpizza.de/wordpress/?p=606

and what i want to do is, that my rigidbody chracter is "ideling" a little bit around. so that means that he pushes himself up (addforce) when he is moving down, and back down when he is moving upwards. the same for left and right. in the end he should always try to push himself back to his start position or a specific point. so that it somehow looks like natural floating around in space. how would you do that?

Comment

People who like this

0 Show 1
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 Fattie · Dec 17, 2015 at 06:15 PM 0
Share

it is extremely hard to do this. Look for scripts on the asset store / etc which simulate "bobbing" motion in water. you could easily have a team of three or four top-flight mathematicians and engineers work on this for three months. you won't find a trivial solution (unless it is crap)

1 Reply

· Add your reply
  • Sort: 
avatar image
Best Answer

Answer by Fattie · Dec 17, 2015 at 06:19 PM

For this difficult problem, the simplest reasonable solution is,

1) attach one of Unity's natty spring solutions

2) write a script to VERY gently force the object in random directions at (probably) about 2hz

Note that when you see this done in say a PIxar movie, it is very much animated, not simulated. So, literally one of the half-dozen best animators on Earth will sit there for a few days and animate an "idle bobble" for the object in question. For buoancy in water, you can simulate it with math but it's usually not very good.

I hope the simple solution using Unity's handy spring, works for you.

Comment
Der_Kevin

People who like this

1 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 Der_Kevin · Dec 17, 2015 at 07:37 PM 0
Share

Hey! Thanks! Gonna try that :) Just to understand: you mean spring joints?

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.

Update about the future of Unity Answers

Unity Answers content will be migrated to a new Community platform and we are aiming to launch a public beta later in June. Please note, we are aiming to set Unity Answers to read-only mode on the 31st of May in order to prepare for the final data migration.

For more information, please read our full announcement.

Follow this Question

Answers Answers and Comments

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

Related Questions

Rigidbody.AddForce seems not to do anything 0 Answers

Rigidbody doesn't seem to apply gravity 1 Answer

Adding Gravity to a game object to make a black hole sucking effect. 1 Answer

How to fix / remove movement jitter from player? 0 Answers

Please Help, I am stuck. I created a script which uses touch input for movement. Although it isn't working on the gameobject i created. Please Help. 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