- Home /
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:
Player Rigidbody 2D, gravity scale = 1 Box Collider 2D
Ground 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!
tundoo
Why does the ground have a rigibody? If it really needs one, then try the rigidbody's xyz axis movement and rotation constraints.
Answer by maccabbe · Mar 11, 2015 at 11:12 PM
You have two options
Remove the rigidbody from the ground.
Set isKinematic to true in the ground's rigidbody.
Your answer
Follow this Question
Related Questions
HingeJoint with no rotation? 0 Answers
Why Is The Cube Sinking into Terrain ? 1 Answer
Problem with Unity Terrain and GameObject 0 Answers
My 2 Objescts doesnt collide 1 Answer