Colliders not... colliding?

Hello, everyone!

I have a very strange problem. I have created a script which states that OnTriggerEnter(Collider other), if other.gameObject.name equals this.gameObject.name+“_piece” it should trigger a certain event (this event can be anything, and I’ve changed it a few times, but no matter what it is, I still have the same problem.)

Now, I have an object with a collider and a rigidbody called Chasha1 and I copy-pasted it, renaming the pasted copy to Chasha1_piece. I gave Chasha1 the script and, when the two collided, the event was triggered, and everything was fine.

However, when I tried to do the same with a second and a third object (let’s call them Chasha2 and Chasha3), when their colliders entered their respective _piece objects’ colliders, the event did not trigger. I checked and there is absolutely no difference between the first example and these ones, but these don’t want to work and the first one works. The script is also the exact same script.

Post your code using code tags in case there’s something weird going on in there.

Use print to find out where the script is splitting away from expected behavior. Is it calling OnTriggerEnter() but not entering your if-block? Is it not calling OnTriggerEnter() at all?

Make sure your _piece objects all have their colliders set up correctly, and make sure each colliding pair of objects have at least one Rigidbody between them.

If you are using OnTriggerEnter/Exit, the object needs a rigidbody.

OP already said they’re using a Rigidbody, and it’s already been suggested to double-check for this requirement…