From the course: Unreal Essential Training (2019)

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Trigger volumes

Trigger volumes - Unreal Engine Tutorial

From the course: Unreal Essential Training (2019)

Start my 1-month free trial

Trigger volumes

- [Narrator] We've made a mug that changes colors, but if we add more than one to the scene, it can cause problems, since the editor doesn't know which one to change. At the moment, it just uses the latest one that was created. What we need is to enable input for the mug only while we're nearby. To achieve this, we'll need to add a box collider to act as a trigger volume. Let's open up the mug blueprint again. Head up to Components and scroll down until you get to Box Collision. Let's rename this to Trigger. Now instead of dragging it into the scene to create a reference, let's right-click it and go to Add Event. The two that we're looking for is OnComponentBeginOverlap and EndOverlap. These components will fire an execution trigger whenever Upon capsule crosses the threshold of the trigger volume, either into it or out of it. Let's copy our Enable Input node over here and tie it to the box collision instead. So…

Contents