Question by
NoSixx · Oct 07, 2020 at 09:44 AM ·
c#scripting problemontriggerenter
Trigger Collider on player, looking for other objects with tag entering.
So I have a trigger collider on my player, and I've tagged an object in the world "Oven". On my player's script, I have... Though it's not realising that it is near when I walk near the box. In the past, I've had to make a new script to check if the PLAYER enters but I can't do this considering the script on the player is checking if the "Oven" is nearby.
" private void OnTriggerEnter(Collider other) { if (CompareTag("Oven")) { cookieNearby = true; } } "
Comment
Your answer
![](https://koobas.hobune.stream/wayback/20220613013254im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Having troubles changing my players speed on collision 0 Answers
OnTriggerEnter Issue - Collider problem 0 Answers
Gravitation 0 Answers
League Mode - Sorting Arrays 1 Answer
Script help player controller 0 Answers