- Home /
Sphere moves randomly after adding rigidbody!
Hi, I am particularly new to unity. I am currently trying to make a sphere roll down a hill slope by adding a rigidbody to it. But somehow after giving it some mass and checking the use gravity option, the sphere moves randomly during the game. Instead of falling down on the surface due to gravity it floats about randomly in the airspace. I have checked the gravity direction and it shouldn't be the problem. Any help is highly appreciated.
Thanks, Shantanu
This hill I'm referring to is on a "Terrain". Is there a need to add a rigidbody to Terrain too ?
No, you definitely don't want to add a rigidbody component to your terrain.
Are you applying some force to the sphere, or just let it freely fall?
Try resetting the component and see what happens. Perhaps you fed in a problematic value.
Thanks for your reply.
I am letting the sphere fall freely, no force at all. Tried resetting the rigidbody component of the sphere. No help. The sphere falls under the effect of gravity from a new position altogether. This position is random too.
As I had mentioned before on removing the rigidbody component, I find the sphere at the very same location I had positioned it. But I can't figure out what the problem with the component is.
@shantanu1singh I'm no physics expert but I was reading the Unity docs in this area the other day and in there it states that there is an implicit assumption that 1 metre = 1 unit and that scaling will affect rigid bodies and their behaviour.
I would suggest you create a sphere in your 3D package of choice that is the size you want and bring this in such that its transform has a scale of 1,1,1 and then you should have the sphere behave correctly with respect to physics and gravity.
If you make a sphere 20 units across however you will be seeing physics applied to a sphere that is 20 meters in diameter and how that (at whatever mass it has) reacts to gravity which I think defaults to 9.81m/s (negative Y).
Your answer
![](https://koobas.hobune.stream/wayback/20220613062231im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
How to have a sphere roll/be affected by friction 0 Answers
Addforce.forward on a sphere object 1 Answer
Wrong gravity calculation? 2 Answers