Best way to limit open world with round boundaries? UE5-0

Hello! Maybe some one could give me a hint how to cost effectively limit open world with circular boundaries?
The idea:


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.
1 Like

No way :slight_smile: That easy! I’ve never think this way. Thank you for the solution!