- Home /
Prevent player to walk over items, but without limiting their ability to place other items on it
Hi, I'm pretty new to unity. I have a scene with a coffee table. The coffee table has a box collider that matches its size. The player character has character controller. Because the table is relatively low to the ground, the player is able to walk over it. If I add a big box collider over the table, the player won't walk over it, but they also won't be able to drop items on it which I need them to do. If I limit the slope or step offset on the character controller, the character won't be able to walk over genuine items of similar height that I want them to walk over, like stairs.
What is the best way to handle this?
Answer by tyruji · Sep 26, 2021 at 07:00 PM
You could take advantage of Unity's physics interaction layers, for this you'd need to make a new GameObject with a boxcollider that would prevent the player from walking over the table. Then create 2 new layers, e.g. Player and Player Collision (name them as you want) and then go to Edit>Project Settings>Physics and scroll to the bottom, there you will see a table which specifies what layers can collide with what, that's pretty intuitive don't worry. Then put the player and the collider in the appropriate layers and you should be good to go. Let me know if that works for you. Have a good day.
Your answer
![](https://koobas.hobune.stream/wayback/20220613043513im_/https://answers.unity.com/themes/thub/images/avi.jpg)