I have a player object that has a box collider 2d and a rigid body 2d, this is set to simulated and to dynamic. Then I have another object that has a box collider where is trigger is ticked, I have also added a rigid body 2d to this object, however, I don’t think it actually makes a difference if I have it or not. (both rigid bodies are simulated and dynamic) Then on my player character, I have the code :
private void OnTriggerEnter2D(Collider2D col)
{
if(col.gameObject.tag == "Box")
{
Debug.Log("No");
}
}
The weird thing is if I get rid of the if statement then the console writes out No, so doesn’t that mean that all the box colliders and rigid bodies work? I’m new to unity so I have no idea. I hope someone can help a fellow new beginner out