How to create a ground/terrain/floor that won't respond to gravity or objects falling on it?

Hello! I researched for hours before asking this question. I can’t seem to find a good answer or tutorial that addresses my issue.

So, I want to create a ground or terrain that the player can walk and jump on, much like in Mario or any 2D game with gravity. The game is 2D and has two game objects: a player and the ground. Both game objects are outlined below:

Rigidbody 2D, gravity scale = 1
Box Collider 2D

Rigidbody 2D, gravity scale = 0
Polygon Collider 2D

The problem is that Player crashes into Ground and pushes Ground downward infinitely. How can I make a terrain or ground object that stays in place and acts like a surface that can be walked on?

Thank you for your help!


You have two options

  1. Remove the rigidbody from the ground.
  2. Set isKinematic to true in the ground’s rigidbody.