- Home /
Collision in oculus rift plugin avatar
Hi,
I am using the oculus rift plugin avatar for making a VR project. It moves fine but, the problem I have now is that it doesn't detect collisions, as in it penetrates the walls, no re-bouncing. I am just starting to use the plugin so, don't know much about its use. Any help on this would be highly appreciated.
Thanks, SM
Right first I don't know the plugin but I know a little about VR. The putting your head through the wall issue is not as simple as it sounds. You should do a general google search about this and check out the Oculus Rift forums to find out more about it. Welcome to a whole new world of issues, welcome to VR ;D
To be slightly more helpful, do do a lot of reading though, if your head collides with the wall when you lean what happens to your body. Do you push the body back? If so it can feel like you are pushing the world around with your head rather than your body sliding back.
If you are stood in a small gap between two pillars and it pushed your body back when you lean forward then where does your body go, into the middle of the rear pillar object.
One general solution is to just make everything black when you put your head in a wall etc. The player should get bored and stop doing it.
Hope this helps you a little :)
It all comes down to having nothing in the real world that restricts your actions in the VR world in the way that they should be restricted by your current VR surroundings and the objects within in. This is a subject that has been discussed in depth in books etc for many years.
Thanks for all your responses. Yes, it appears its not a straightforward mechanism unlike other rigid bodies in Unity, where collision is handled automatically if colliders are put on the objects. I guess I need to do a lot of digging to learn the concepts of motion-control and collision in VR.
Answer by Sethhalocat · Oct 18, 2014 at 01:50 AM
I would put a empty game object and give it a box colider. Then make it a little bigger then your regular box or sphere or other object. If your having trouble with the collided being animated then I'm having that problem too lol. Otherwise, this should work in most caces. It does for me
Answer by ybaklaci · Oct 12, 2017 at 09:45 AM
Perhaps, you can add a sphere collider around the eye anchor. Sphere would represent shape of a head better than a box and is faster for collision detection. This would solve the issue for dynamic rigidbodies colliding with the head. Collision with static colliders (walls, desk, etc.) is more complicated though, because the objects can't move.
There are several suggestions around the internet regarding this issue (fading the object, darkening the screen, increasing radius of character controller). One of these might be a good fit to your application.
But in my situation, my app was a simulation and all of these solutions above, decreases the immerse feeling of VR. So I ended up using Head Collision VR, which stops the camera from going through the GameObjects. It is using a combination of collision, raycasting and overlapping to sense the collision and stop the camera move in the direction of the collision. And when the collision is over, the camera position in 3D space is restored in sync with the head move.
This way, shaking and pushback is avoided, so cybersickness is not an issue. I had it tested by several people who had tried VR the first time, and they were mostly effected by locomotion but not head collision.
Your answer
Follow this Question
Related Questions
Converting VR into AR - stereoscopic video inputs/rendering 0 Answers
Unity crash when using Oculus Rift and SteamVR 0 Answers
oculus rift for virtual reality in unity 1 Answer
In VR, how do I not let the reticle go beyond the far clipping plane? 0 Answers
Windows MR Single Pass View Upside Down - 2018.0.2b7 2 Answers