Getting a ball to roll down a hill...

Trying to make an extremely simple 3D scene, but getting stuck.

I’m trying to make a sphere roll down a plane that is at a slight angle. The sphere has the sphere collider and rigidbody components, and the plane has a mesh collider component. Gravity is -9.81. The sphere is positioned slightly above the plane. That’s all there is to it.

When I press play, the sphere moves a frame and then gets stuck in the air. It never even makes contact with the plane. In the console, I get the error message “GUI Window tried to begin rendering while something else had not finished rendering! Either you have a recursive OnGUI rendering, or the previous OnGUI did not clean up properly.”

Does anyone know how I can begin to address this? A search on google got me nowhere.

No idea about that weird error. But Unity does spit out weird errors sometimes; usually you can ignore them.

A more likely problem is that mesh colliders don’t work very well. Something like a plane should use a box collider. Also, if the plane isn’t going to move, it should be marked Static (near the top of the inspector panel).

1 Like

Thanks Joe!

I was getting this error with Unity 2020.1.13f1. I restarted the project in 2019.4.17f1 and it worked fine.

1 Like

I got this error when I have multiple Unity windows open, it goes away if I close one of them

1 Like