OntriggerEnter doesnt work no matter what i do

    void OnTriggerEnter(Collider other)
    {
        Debug.Log("Collision detected with " + other.name);
    }

The other object also has a collider and a rigidbody2d

You’re using the 3D physics callbacks, not the 2D ones.

I recommend you follow some starter tutorials first as they show you the correct callbacks to use etc.

4 Likes

Use OnTriggerEnter2D instead of OnTriggerEnter

private void OnTriggerEnter2D(Collider2D other) {}
2 Likes