How can i setup collisions for a house that i have in my fps game. Right now the character just walks trough the walls so i need to setup collisions.
Add RigidBody component to it and colliders. The objects that you want to collide it with must have a rigidbody too.
From my perspective, there are 3 things that can be at fault:
- Your character doesn’t have a rigidbody attached (house colliders don’t need to have it)
- The collider attached to house and/or character has
isTriggerset to true.
- House is in a layer that doesn’t collide with character’s layer. You can fix this by going to
Edit->Project Settings -> Physics, where you will find a matrix indicating which layers “interact” (collide) with one another.