Share on facebook
Share on twitter
Share on google

You’ll use this component mostly to create player interaction with the trap. You can create trigger zones that activate the trap when the player enters, such as a pressure plate.

You can use this component in a more advanced way, like using a disarm box when the player presses the E key.

  • Trap: the trap that this trigger manipulates.
  • Action: you can activate, deactivate the target trap or toggle between these two states.
  • Cooldown: seconds before the trigger would work again.
  • Tag: only trigger when a game object with one of these tags enter.
  • Interaction: You can allow the player to execute the action by pressing a button while staying in the trigger area instead of just walking into it. You can use Key Codes or Unity Input.
  • Events: You can use these events to make visual effects for the trigger or show/hide a UI element.