0
\$\begingroup\$

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..

\$\endgroup\$
  • \$\begingroup\$ maybe it's rolling? \$\endgroup\$ – ratchet freak Apr 7 '15 at 10:39
  • \$\begingroup\$ The ground plane has no rotation, so it can't roll because of a slope :| \$\endgroup\$ – frankish Apr 7 '15 at 12:11
  • \$\begingroup\$ but friction during the slide causes a torque which results in rolling. Add a texture to the sphere to make sure. \$\endgroup\$ – ratchet freak Apr 7 '15 at 12:14
  • \$\begingroup\$ of course the sphere rotates while also moving forward according to the it's latest direction. "Angular drag" combined with "drag" prevents it but it stops very quickly. I can't make it very smooth \$\endgroup\$ – frankish Apr 7 '15 at 13:56
  • \$\begingroup\$ If you turn up the friction high enough will it stop moving? A solution might be that when input is being given, you set the friction low, otherwise if no input is being given, you increase friction over time to some large value \$\endgroup\$ – Alan Wolfe Apr 7 '15 at 14:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.