Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 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
1
Question by barrett777-2 · Jun 01, 2011 at 04:33 PM · physicssphereballroll

Ball Doesn't Roll Down Hill - Physics Problem

Hi Everyone,

I'm trying to get a ball to roll up or down a hill realistically.

With default settings for a sphere, if I apply force it rolls realistically, but will roll right up and over any hill, and basically roll on forever. Of course it should slow down when rolling on a flat surface.

The default angular drag was 0.05

If I increase this to 10, then it will roll and stop more realistically, but if it stops while rolling up a hill, it won't roll back down. It just sits on a hill.

If I crank up the gravity, the ball will roll down a hill a little faster, but won't accelerate.

From what I've read, mass doesn't affect gravity, it just affects collision with other objects? Is that true?

I've been trying to tweak these numbers, does anyone have some good numbers for just a simple 1 scale, 0.5 radius sphere to roll accurately?

I want a ball that will roll down a hill, and speed up faster and faster the longer/steeper the hill is, and slow to a stop on a flat surface.

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

3 Replies

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

Answer by barrett777-2 · Jun 01, 2011 at 05:43 PM

Well I answered my own question in a way. Instead of just setting the velocity, I'm now using ApplyForce, and with that change I'm able to fiddle with gravity and drag to get what I want. Thanks for your help :)

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 Anxo · Jun 01, 2011 at 04:40 PM

It sounds like your constantly adding force. "Realistically" the ball only has force applied to it when you "kick it" the rest of the time it is reduced by air and contact friction. So if you have AddForce in your FixedUpdate, you would get an unrealistic result.

You need a One time shot to add force briefly then let it go its course. Look up AddExplosionForce in the documentation.

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 barrett777-2 · Jun 01, 2011 at 04:47 PM

I do just add force once:

Ball.rigidbody.velocity = CameraForward.transform.forward * BallSpeed

Currently I'm using 25 for BallSpeed, with Angular Drag at 25 and the rest default, because in my opinion this looks the best, except it won't roll down hills.

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

3 People are following this question.

avatar image avatar image avatar image

Related Questions

Create a "free" rolling ball controlled by player 1 Answer

Strange sphere/physics rolling behaviour when scaled 1 Answer

How to make a ball roll by pushing it with a cube? 1 Answer

Making a ball roll and keeping the axis? 2 Answers

Sphere Friction Not Working Correctly When Bouncing Hard 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