Search Unity

Resolved On Trigger Enter sends 2 true messages

Discussion in 'Visual Scripting' started by Tinniman, Oct 4, 2022.

  1. Tinniman

    Tinniman

    Joined:
    Dec 14, 2020
    Posts:
    49
    Hi.

    I have a On Trigger Enter with a tag filter on player. Whenever player collides with a box the box should instantiate an object. That works but my problem is that it constantly instantiate two objects instead of one.

    I know it is the trigger enter node. Is there a way to force one trigger?
     
  2. PanthenEye

    PanthenEye

    Joined:
    Oct 14, 2013
    Posts:
    2,072
    You can use Once node. Then reset it with how you see fit. Perhaps On Trigger Exit.
     
  3. Tinniman

    Tinniman

    Joined:
    Dec 14, 2020
    Posts:
    49
    An internet hug from me. Solved it! Thanks:)