How to detect players going out of "custom" bounds?
Let's say that I want my players to stay within a certain volume of the map that I can cover with trigger volumes. What's the best way to detect players who are leaving all trigger volumes such that I can respawn them individually?
I'm asking because I'm not sure whether using the exit signal provided by trigger volumes is a good idea - basically, I'm afraid that an exit signal might get lost. Would it be better to rely on the number of players in the trigger volume? (I have only 2 players and probably only one trigger volume, so I could have one trigger volume for each player.)
Best Answer
Hard to say without further elaborating your method. Particulary how you are merging the signals from multiple zones into an out-of-bounds state is unclear. I assume this involves the onEnter signal in some capacity, which can be dangerous as there are situations where the amount of onEnter signals does not match the number of onExit signals. However on its own you can rely on there being an exit event, if the object left a zone one or multiple times in a tick (and there are always less than 20 events in any single tick).
Seeing how old this question is, you probably already solved your specific case, but for a single zone environment the onExit pin should be as reliable as it gets in RR.
A different method to consider for complex environments is animating a single/few trigger zones in the out-of-bounds space to respawn players. This method scales neatly in theory, in practise there could be problems with the network interpolating placing the zone into unwanted spots in-between keyframes though.
Pictures about "How to detect players going out of "custom" bounds?"
Create Level Bounds | Out Of Bounds/Return To Play Area - Unreal Engine Tutorial
Sources: Stack Exchange - This article follows the attribution requirements of Stack Exchange and is licensed under CC BY-SA 3.0.