Search Unity

Daydream Controller not rotating with torso

Discussion in 'Daydream' started by lfloris, Jan 14, 2018.

  1. lfloris

    lfloris

    Joined:
    Dec 29, 2017
    Posts:
    1
    So I'm not sure if I'm missing something obvious and I can't find much information about this other than it should happen automatically...

    The controller takes on the arm model, and from what I understand the body model (torso rotation) should be integrated and automatic but in both a fresh unity project with Google VR + Elements tutorial scenes and my own project with assets imported, the arm model stays fixed and only rotates about the elbow... which isn't ideal as I'm playing around with an FPS project. Yet on the elements demo application (from play store) the head movement rotates the torso.

    Is there an additional script to import and attach to the GvrController object? I can't find anything that suggests a body model is a separate script. Or perhaps I'm missing a checkbox or something obvious.
     
  2. dsternfeld

    dsternfeld

    Official Google Employee

    Joined:
    Jan 3, 2017
    Posts:
    72
    Can you describe the difference you are seeing between the play store Daydream Elements and when building and testing Daydream Elements yourself? It should be the same, and it should not require a separate script.

    The arm model does not make the head movement rotate the torso with a 1:1 relationship. This often feels unnatural, because it doesn't account for the difference between a person rotating just their head vs. rotating their body. Instead, the arm model approximates this distinction by rotating the torso towards the head direction based on the angular velocity of the controller.

    If you rotate your head and your controller at the same time, the torso rotates. If you rotate only your head, the torso will not rotate. If you start moving your controller after rotating your head, the torso will start rotating and "catch up" to where your head is.

    You can check out the implementation in GvrArmModel.UpdateTorsoDirection. This technique tends to be preferred even for apps that require aiming 360 degrees around the user. However, if it's important to your app's experience that the torso direction updates immediately to match the head, you can do it like this:

    Override UpateTorsoDirection, and call base.UpdateTorsoDirection(true) to force the torso direction update to be immediate.

    Thanks,

    Dan
     
  3. natedorelus

    natedorelus

    Joined:
    Mar 27, 2019
    Posts:
    1
    I'm facing the opposite. I'm desperately trying to stop the controller from rotating with my head but nothing that I've done has worked. Every time I turn my head, the controller turns with it. I end up having to keep the controller in the original orientation despite turning my head every which way. How do I stop this from happening?