I'm making a game in Unity where when the player comes into contact with an NPC it will switch scenes. I have the code for it and made sure all NPC's have rigidbody as well as using gravity and convex. They do not fall through the world but as soon as I click the trigger box on the mesh collider they start falling straight through the world. The switching scenes code works fine - I tested it and it does switch the scene.
When you set the
isTrigger property of a
Collider, it no longer registers collisions with incoming rigidbodies/colliders. As a result, your NPC falls through the floor.
If you want the scene transition to occur immediately upon contact with the NPC, you could simply uncheck
isTrigger and put your scene transition code inside of
OnCollisionEnter() instead of