I wanna make my first horror game, where player, when he goes out of the path, hears a specific sound. I made a “Fence” by using ProBuilder, result is on the first photo.
How the map looks
Inspector menu of the map
The main problem is that sound plays even if player didn’t enter the collider.
I used the code, where player enters the fence and the fence enters player. Both variants gave the same result.
Code of the map]
Part of the player’s code
How can I make my idea to come true?
Oromyrchik is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.