Hi anyone have any idea how you can have the headset screen go completely black when a player tries to put their head through a wall for example?
While the following tutorial is not exactly what you want, it could give you some help you as it shows you how to interact with the Chaperone system.
- Attach a collision sphere to your VR Camera. Use a sensible dimension, it should be pretty much like a head.
- On its BeginOverlap Event, check if it is overlapping with a wall. If so, use StartCameraFade to fade to black.
- On its EndOverlap Event, check if it stopped overlapping with a wall. If so, use StartCameraFade, but with reversed Alpha, to go back to the transparent HMD view.
A word of caution. If you fade someone’s view to black and they are still moving IRL, they may lose their balance and hurt themselves because they are missing any visual reference. Make sure your subjects/players are fine with that and keep them safe. Instead of fading to pitch black, you can fade to a 75% black for example.
That’s a great tip thanks.
Jonas Molgaard made a Youtube series on this issue some time back
He also shows how to eject a player from the wall. Both for gameplay and for user experience reasons.