Search Unity

Daydream controller "laser" doesn't match GvrController.Orientation forward

Discussion in 'Daydream' started by Tuitive, Dec 22, 2016.

  1. Tuitive

    Tuitive

    Joined:
    Mar 25, 2013
    Posts:
    36
    I want to have projectiles shooting out of my controller, which I have working, but I expected it to follow the same path as what the controller "laser guide" shows. And in the editor at run time, the laser is pointing straight forward out of the controller 3D model. However, when deployed, the laser is pointing ~14.5 degrees downward relative to the controller 3D model rather than straight forward as calculated by GvrController.Orientation * Vector3.forward.

    What gives?
     
  2. nathanmartz

    nathanmartz

    Official Google Employee

    Joined:
    Sep 24, 2016
    Posts:
    22
    Good question. That's by design. We found that people hold the controller more naturally when the ray is angled down. This is a requirement for UI navigation but not for anything in the game, so you can change that offset as necessary.
     
  3. Tuitive

    Tuitive

    Joined:
    Mar 25, 2013
    Posts:
    36
    @nathanmartz that makes sense. Thanks for pointing out the Pointer Tilt Angle property...hadn't noticed that yet!
     
  4. Vetabyte

    Vetabyte

    Joined:
    Sep 4, 2017
    Posts:
    13
    Where is the pointerTiltAngle? I looked at the database and it says that is what i should be using, but it is nowhere to be found in any of the scripts. I looked everywhere for something similar but nothing worked. I want to tilt the laser even more in certain parts of my game. It seems that tilt variable has been removed. Anyone know where it is hidden? Thanks!

    PS: I know this is an old post but you can never win in the forums. You either get yelled for not searching old post and making a new thread or vice versa get yelled for replying to old post.
     
  5. dsternfeld

    dsternfeld

    Official Google Employee

    Joined:
    Jan 3, 2017
    Posts:
    72
    Good question!

    In the 1.10 version of the GVR Unity SDK, the pointer tilt angle property was removed from GvrArmModel in favor of simply modifying the orientation of the laser object in the prefab. Now, you can change the angle by simply changing the rotation of the laser along the x-axis.

    Relevant bit from the release notes:

    "Removed PointerPositionFromController and PointerRotationFromController from GvrArmModel. Position and rotation of the laser are now in the prefab, which makes it possible to simply move the laser relative to the controller."

    Thanks,

    Dan
     
    vuplex likes this.