cancel
Showing results for 
Search instead for 
Did you mean: 

Best way to get working oculus avatar in Unity engine?

StormyDoesVR
Heroic Explorer
Ok, so I'm making an arena type game where character will move around a map shooting and attacking enemies and other players. Currently I have the avatar hands working (can pick up, throw objects) but the way I have the heirarchy set up I had to turn off the OVR player controller scripts HMD rotates Y option. Because of this a person can't turn in VR and head the direction they are facing. The have to remain forward and turn with the right touch stick only, which I find extremely nauseating. Does anyone know how I'd fix this?
3 REPLIES 3

pjenness
Rising Star
Hiya
Anything is doable.

How do you actually WANT to control the character's turning?

Do you have a character controller driving the motion in the top of the heirarchy?
Are you planning to use snap turning buttons, or want to get back the functionality of having the character rotate towards the players view?
Many people find the snap turn less nausiating in VR, and many find they prefer free movement, so I'd encourage both options avaialable.


One thing to be careful of letting the player rotate the controller using their view direction is, if they only rotate their head and not body, it can quickly induce motion sickness as they are traveling sideways, instead of natural forwards (try going out side and looking to your left and running sideways. Your natural instinct is to orientate your body towards your main movement vector when walking, but often gamin a player stand stationary as there is no room to walk, but turn their head instead..that can be motion sickness inducing.)
The headset only knows the direction of the head, but not the players actual body
Some apps use fading of screen on off center looking to encourage the view to remain straight ahead, and to turn with the snap turn buttons or joystick.

Since you are building for Touch it maybe gives you an option to use the location of the 2 touch controllers and the headset direction to "Guestimate" the players body rotation. Possibly using  the average of the 2 touch positions from the headset you can very slowly (LERP)  rotate the controller in that direction, and you'd probably be in the ball park for most of the time. But it'd take a bit of testing to get that feeling right.


Good luck

-P



StormyDoesVR
Heroic Explorer
Thanks for the info! Yeah, it's a little bit of both. I want to do joystick locomotion, not teleportation, and so I have it set up currently so that the character can move freely around the space (but you only look like you're going forward if you look forward). I'm not 100% sure how to enable snap turning, but that would be great if it worked. However, the locomotion system I'm going for is like the VR minecraft's locomotion, where generally locomotion is locked to head movement but you can change it slightly with the stick through snap turning. However, whenever I turn on the option for HMD rotates Y in the character controller options, suddenly my touch controllers no longer accurately sync to where my irl hands are. That my biggest problem.

StormyDoesVR
Heroic Explorer
Thanks for responding imperativity! Yeah, I'm a part of that thread too, although I had a different goal there, maybe the two problems are tied. Workin' on it, thx! ^^