Just can’t figure out what I’m missing here. I’m trying to use the OnTriggerEnter2d method.
I have a projectile shooting out, and making contact with a moving rock.
Both objects have a circle collider2d and a rigidbody 2d.
I’ve tried adding this to one or even both objects, I’ve clicked the IsTrigger on the collider for one and even tried both objects.
void OnTriggerEnter2d(Collider2d other) //I’ve also tried (CircleCollider other)
{
Debug.Log(“Triggered.”);
}
The objects otherwise collide fine. Or don’t collide depending if I have IsTrigger checked.
I feel like there’s something straightforward I’m missing?