Unity REUSABLE TRIGGERS in 110 Seconds

Опубликовано: 28 Ноябрь 2023
на канале: Raycastly
2,107
115

We use triggers everywhere in our games. This is one of the most useful pieces of code that you will use in your game dev journey. When a player enters a trigger zone or trigger volume you might want to spawn an enemy, start a dialogue or trigger a cinematic sequence... The possibilities are endless!

Get my Asset Pack + 2D Water System + 2D Moving Platforms and MORE FOR FREE HERE:
https://bit.ly/free-game-dev-assets

If you get stuck, you can ask for help on our discord server! Join through this link:
  / discord  

TriggerZone.cs
https://pastebin.com/gatH6qRy

---------

0:00 Intro
0:12 Setup
0:25 Trigger Zone Code
1:00 Testing I
1:07 One Shot Trigger Code
1:18 Testing II
1:28 Collision Tags Code
1:34 Testing III