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 /
This post has been wikified, any user with enough reputation can edit it.
avatar image
0
Question by Finity · Apr 08, 2015 at 03:06 AM · colliderdragspherefrictionsleep

How to slow down a Sphere smoothly in a world controlled by force and stop it?

I am a beginner and I started to use Unity 5. I play with tutorials on the site and documentation. I was basically testing springs, physics materials etc.

I have a problem understanding probably a very basic thing:

  • I have a Sphere (Collider + Rigidbody) and a Ground (Mesh Collider).

  • I add force to Sphere on FixedUpdate with GetAxis method.

  • I added Physics material to both sphere and the ground to create a friction.

  • Ball slows down when I do not touch the keys (no new forces) but it never stops while moving on the ground.

  • I know that as only 1 point is touching the gorund friction may not be good enough, but it almost does not affect the ball after a certain period. (I print the speed of the ball (Sphere) on a GUIText so I can numerically check it there too.)

  • I am aware of default Sleep treshold value but it will effect everything as it is a global variable, so I can't use that.

  • So, ball never sleeps.

  • I am aware of drag and angular drag (like the friction of Air) of Rigidbody component and they for sure work, BUT it feels like the ground is sticky and ball stops very quickly. It doesn't look smooth and natural.

Is there something that I am missing? The only way to do this is checking the speed of the ball and making it sleep manually when it's speed is low? Isn't there any other method? I don't want to do this as the world itself must live itself: I don't want to check movement of every single object..

This is probably one of the most basic things, but I cannot understand why it doesn't work..

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

2 Replies

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

Answer by AlwaysSunny · Apr 08, 2015 at 03:21 AM

No, I don't think you're missing anything. Dialing in the dozen or so different properties of any physical interaction to absolute perfection is not what I'd call an easy process. It definitely involves a lot of tweaking, experimentation, and perhaps a few sacrifices regarding expectations.

I remember being in a somewhat similar predicament about a year ago. Eventually I got so frustrated trying to find the various "sweet spots" I was after, I actually wrote a script which randomized the physical properties of several test objects, agitated the scene with random forces, and took down notes about which combinations of properties worked well to approach my desired results. I don't recommend this per se, but it illustrates the degree of care and experimentation involved in really nailing down what you want.

My advice is; take every liberty with the tools available. Don't be shy about giving things unrealistic masses or coefficients of friction, drag, etc; as long as it works, it works. Unless you're making this for a doctoral thesis in applied physics, nobody's going to care whether it's realistic. Gamers just want what feels good; this boils down to "responsive" and "satisfying" - whether they realize it or not, "realistic" is pretty far down on the list.

I don't recommend any fiddling with forced sleeping (not for this application anyway) or otherwise interfering with the kinematics. A measure that drastic should always be a last resort.

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 Oliver-Bogdan · Oct 03, 2016 at 03:11 PM

There seems to be a bug in Unity regarding physics and spheres (present even in 5.4.1)

For a quick and dirty fix see my answer here: http://answers.unity3d.com/answers/1251251/view.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

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

4 People are following this question.

avatar image avatar image avatar image avatar image

Related Questions

Wrong gravity calculation? 2 Answers

Make a capsule collider BETWEEN 2 objects 0 Answers

Friction affects ball's direction after collision 0 Answers

Rigidbody sleeping prevents collision detection 4 Answers

Control Object Script 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