Best way to get working oculus avatar in Unity engine? — Oculus
Welcome to the Oculus Developer Forums!

Your participation on the forum is subject to the Oculus Code of Conduct.

In general, please be respectful and kind. If you violate the Oculus Code of Conduct, your access to the developer forums may be revoked at the discretion of Oculus staff.

Best way to get working oculus avatar in Unity engine?

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?
------------------------------
PC specs - GTX 1070 (MSI AERO); 16GB Corsair Vengeance DDR3; intel i5-4590, MSI motherboard (don't remember but it was a combo deal) and an EVGA Supernova 750W semi-modular.

Comments

  • pjennesspjenness Posts: 674
    Neo
    edited January 2017
    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



    Drift VFX Visual, Virtual , Vertical

    Want 970GTX on Macbook for good FPS?
    https://forums.oculus.com/viewtopic.php?f=26&t=17349
  • Firestorm185Firestorm185 Posts: 99
    Hiro Protagonist
    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.
    ------------------------------
    PC specs - GTX 1070 (MSI AERO); 16GB Corsair Vengeance DDR3; intel i5-4590, MSI motherboard (don't remember but it was a combo deal) and an EVGA Supernova 750W semi-modular.
  • Firestorm185Firestorm185 Posts: 99
    Hiro Protagonist
    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! ^^
    ------------------------------
    PC specs - GTX 1070 (MSI AERO); 16GB Corsair Vengeance DDR3; intel i5-4590, MSI motherboard (don't remember but it was a combo deal) and an EVGA Supernova 750W semi-modular.
Sign In or Register to comment.