So I am making a 3D game where the player has to touch a jaguar to make it disappear. The jaguar is a pickup. I am new to Unity, but now I had some experience with the 2D games and I made two 2D levels. This is my first 3D game. The game would be finished by now, if only I could fix the problem. I did follow the Roll-a-Ball 3d tutorial and here is the code they gave me for colliding with a pickup (jaguar in this case). I’ve used this chunk of code for my 2D levels, but I don’t need to share my entire code:
void OnTriggerEnter(Collider other)
{
if(other.gameObject.tag == "Jaguar")
other.gameObject.SetActive(false);
}
In this game, I do not have problems with the colliders at all. I know for sure they are touching each other. I used Sphere colliders in this game for each jaguar and the player itself. I have the “Is Trigger” on in the jaguars, and the “Is Trigger” off on the player (That’s how it worked in my 2D games). The jaguars have the “Jaguar” tag. But still, nothing is happening when the player’s collider touches the jaguars’ colliders. I do have the Sphere Colliders and Rigidbody on all the jaguars and the player