Hey you guys, I’m new to Unity but not at all to scripting and coding.
I have a simple (yet frustrating) problem.
So, I have this ball (my player) that rolling around a surface.
I added water around this surface.
I wanted to trigger a sound when the ball falls into the water but the collision never works.
That’s weird because I have a lot of other collisions with all kind of things that works perfectly fine.
I guess I’m forgetting to configure something with the water but i don’t know what.
I tried to put a tag to the water and check if the collision occurs (from the ball script).
I tried to check with the layer (number 4 - water) also without any luck.
I also tried to detect the collision from the water script.
Is there a component I need to add? Adding a box collider didn’t solve my problem.
This is my first thread so I hope I didn’t left out any important details. If so, tell me and I will add.
Thank you in advance.
*** Update - Works:
It was the silliest thing, I had to use “OnTriggerEnter” instead of “OnCollisionEnter” because the ball fell in to the water and did not “collide” and stopped on the water. ***