cancel
Showing results for 
Search instead for 
Did you mean: 

Preventing the player from putting their head through virtual walls

richchcole
Level 2
I notice that games like Echo One prevent the character from putting their head and hands inside objects. I wonder if anyone has advice on the best way to do this sort of thing in Unity. I looked at Rigidbody but it seems it teleports unless you use forces. I wonder instead whether one should modify OVRCameraRig to cast a sphere from the current head position to the intended head position and only allow it to move as far as the first collision. Does such an approach make the player sick?

I'm also curious about gravity. I added the ability for the player to pull themselves through the air a bit like in gorn (except I allow it in any direction) which seems ok for movement (it gives you a bit of a work out if you need to travel far). It also seems quite compelling if you're climbing a rocky cliff (or rather pretending to do so because i have no gravity as yet). I wonder if once the characters avatar are far enough away from support if you make the character fall at a constant rate whether that will make one sick or loose presence.
1 REPLY 1

MikeF
Level 10
Ive found any kind of artificial movement to keep players within world bounds to be very uncomfortable, but in some cases its the only option. 

The most comfortable alternative that gets used frequently is to fade out the world as the head anchor enters an out of bounds position while also presenting some sort of recenter prompt to the player. 

This is something that needs to work with your game design though so there isnt a global solution for all cases.

Hope that helps 🙂