How to detect players going out of "custom" bounds?

How to detect players going out of "custom" bounds? - Person Riding a Motorcycle Going out from the Tunnel

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?"

How to detect players going out of "custom" bounds? - Man in Blue Denim Jacket and Blue Denim Jeans Holding Black Fishing Rod
How to detect players going out of "custom" bounds? - Man in Blue T-shirt and Blue Denim Jeans Sitting on Gray Carpet
How to detect players going out of "custom" bounds? - Woman in White Long Sleeve Shirt Standing on Blue and White Floor Tiles





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.

Images: Loifotos, cottonbro, cottonbro, cottonbro