Search Unity

Getting a ball to roll down a hill...

Discussion in 'Getting Started' started by benrho, Dec 24, 2020.

  1. benrho

    benrho

    Joined:
    Jun 22, 2020
    Posts:
    5
    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.
     
  2. JoeStrout

    JoeStrout

    Joined:
    Jan 14, 2011
    Posts:
    9,859
    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).
     
    benrho likes this.
  3. benrho

    benrho

    Joined:
    Jun 22, 2020
    Posts:
    5
    Thanks Joe!

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

    sonnyyap

    Joined:
    Jan 26, 2015
    Posts:
    1
    I got this error when I have multiple Unity windows open, it goes away if I close one of them
     
    Joe-Censored likes this.