Search code examples
unity-game-enginegravity

Unity3d Gravity issue .Sphere passing through the board


I am making "Marble-board" game using Unity3d with mono-develop(c#).i want to make marbles rolling using gravity.But marble is passing through the board ,when i apply gravity to it.please help to solve my problem

For more specification, Rigidbody Component of Sphere: Use Gravity : true Is Kinematic :false


Solution

  • Generally, Rigibody is needed for physics - ie. the sphere should have a rigidbody if you want to use a built-in Unity's gravity. The ground should only have a collider ↓

    All objects need Colliders to be able to detect collision. Make sure both objects have Colliders and the isTriggered is false (unless you handle collisions with scripts).

    So, in a simple setup like this

    enter image description here

    The Planes properties:

    enter image description here

    And the Sphere's properties:

    enter image description here

    So when the Sphere drops onto the Plane it does not go through.