Problems making a simple obstacle
(I am a beginner)
I'm creating a game in 2D and all I want to do is make an invisible barrier that the player can't walk through.
I made an empty game object and gave it a box collider (with "is trigger" off) and a rigid body (with "use gravity" and "is kinematic" off).
On my player, I also have a rigid body (with "use gravity" and "is kinematic" off), but I have two box colliders. On one of the box colliders, I have "is trigger" on. On the other, I have "is trigger" off. I need the box collider with "is trigger" on for another aspect of the game.
So when I walk my player into the empty game object, the player just starts floating around the screen and rotating. This doesn't happen until I walk into the empty game object. If I don't run into it, my movement behaves the way I want.
I've tried removing the box collider on the player that has "is trigger" on, but I still get the same error.
I don't have any physics materials assigned to any of the box colliders.
Any help someone can offer will be greatly appreciated. Thanks.