When character reaches orange boundary - show alert widget. When character reaches red boundary - teleport character to specific coordinates. Level might be 5-10 kilometers. What is the best solution, use a trigger volumes, invisible sphere actors with collision or other way that I can’t think of? Thank you.
Make dummy actor that is something like “center of universe”
Every second or so (or on level tick):
find all actors of class (center of universe)
(location of center of universe - location of player) and get length of that vector. Now if your world is mostly flat, you want calculate only horizontal distance, so before calculating center of universe - player location, multiply both locations by [1,1,0] ie zero Z value
now you have distance, so if player is too far, start your popups or just kill pesky human.