Basically, I’m a starter to Unity and I recently started doing the Roll a Ball project. I got to the point where I was tagging the Pickup game object, and I did everything the videos told me to do. However, when I run the game, everything goes well except the fact that the Pickup objects aren’t disappearing like they should whenever the Player collides with them. Does anyone know what’s going on?
I’m not familiar with this tutorial but I’m going to guess what you could be missing
Make sure that
- Both the player and the collectibles have Colliders attached to them
- The collider on the collectible has the “IsTrigger” checkbox checked
- Make sure that either your player script or your collectables script has a function in it that looks like this:
void OnTriggerEnter(Collision col)
**
If you have all this set up correctly then check if your OnTriggerEnter function is being called by puttingDebug.Log("Trigger detected");
inside the function and then looking at the console window as you roll over an object. In either case let me know and I can help you track down the issue some more.