So I have hit a roadblock with a project , I want lots of objects to be able to know when they are touching each other, onTriggerEnter could do this but it requires a ridgedbody witch can be a tad lagy one you get to many,is there a better way to do this?
all code in c# please,
thanks in advance.
Objects that move and have colliders should always have a rigidbody or they will be even slower. Implementing something that works similarly would probably not worth the time and they would probably be less efficient. You can set up a collision matrix and only have those objects collide with each other so they are never checked against other layers. You could disable objects that are far away from everything else if that’s possible in your game. Try to minimize the objects count that needs to be checked every physics update.