I am trying to make a 2d game where you drag objects with the mouse and let go of them either in air or on the ground. The air is the blue in the image below and the white is the ground. I want the green square on point 1 to fall down until it touches to white ground and bounce a little and then stop moving. And if its dropped in point 2, I want it to just bounce a little at its position. So its basically a vertical floor in 2d. How can I achieve this?
I have tried to make the air and the ground box colliders to triggers and when the square is in contact with air the rigidbody is activated and vice versa. But that was glitchy so now I need a new solution.
I also need the square to be able to stay everywhere on the ground so I cant make that to a normal box collider 2d because then it cant stay inside it.
Thanks in advance.