What is better? (Trigger question)

Hi everyone. I am working on a game. I dont realy have a coding problem. I just want to know what is better performance wise.

My characther will interact with some objects in a big world (like doors, poster and so on)
What is better performance wise. To have 1 trigger in the characther that checks if any object of a certain type is in it or having a trigger per object that lets the player interact with it when it is entering it.

I feel like the trigger on the player is better. But i dont know how much it takes on performance to check if some object is inside the trigger (since what i know. The onTriggerEnter dont work if the object is not moving and the trigger is)

Also. If you have a better idea then what i came up with. Please do tell :slight_smile:

If you’re using Physics (the PhysX engine), I don’t believe there’s a difference in performance, but different setups can cause issues. In general, your character should probably have a kinematic rigidbody. Your interactive objects – as long as they don’t move – should probably have static colliders. (Never move an object with a static collider, as this will force PhysX to recompute the scene graph; if it has to move, give it a [kinematic] rigidbody.)

Myself, I would make the interactive objects’ static colliders into triggers and keep them as simple as possible (spheres or cubes, never complex meshes).

I think the OnTriggerEnter issue you’re talking about only occurs if a static collider moves into a sleeping rigidbody. In this case, it won’t wake up the rigidbody, and you won’t get a collision message.