How to make triggers collide with player?

I have all my code in the player object, when the player collides with the door and has 2 keys then the door will disappear and a new sprite will take its place that looks like the same door but its open instead.

Well… thats what should happen. I have checked the box in the closed door object the says Is Trigger and started to test it but when i walk to the door without any keys or just one i go straight through the door without it even changing to and open door, but when i have 2 keys and walk to the door it changes correctly.

So my question is how do i make objects that have Is Trigger checked still collide with other objects?

Thanks in advance!

Your question isn’t clear enough. What’s exactly the problem? Do you want to know how to make the door “solid” until the player has got two keys? A possible solution is to use two objects, a trigger and a collider: detect when the player enters the trigger, check whether it has the two keys, and if so delete the collider object and replace the sprite. NOTE: the trigger must be bigger than the collider (say, 0.2 to 0.3 meters on each side) in order to react to CharacterControllers.

Hey There,

A trigger is a collider that does not have collision (as in blocks movement). If you want a trigger zone you do what aldonaletto was saying. Have one box collider as your door and a second one as the trigger.