Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice

My hands in Oculus Rift follows my gaze (OVR packages, VRTK, Unity)

Discussion in 'AR/VR (XR) Discussion' started by congcong612, Jan 22, 2018.

  1. congcong612

    congcong612

    Joined:
    Jan 22, 2018
    Posts:
    3
    Hello! I need some help!
    I imported OVR Packages(OVR Utilities, OVR Avatar SDK, OVR platform SDK, OVR Sample Framework) and VRTK in my Unity Project.
    Now when I move my gaze, my virtual hands move with my gaze and no longer being the place where controllers are. How can I solve the problem?
    Before I added OVR Gaze interaction. But I think I deleted them already.

    I can't find any related information.
    Hope can get help here! Thank you! :)
     
  2. Matt_D_work

    Matt_D_work

    Unity Technologies

    Joined:
    Nov 30, 2016
    Posts:
    202
    Do you have your "hand" game objects parented to the "camera" game object as that would potentially cause this.
     
    congcong612 likes this.
  3. congcong612

    congcong612

    Joined:
    Jan 22, 2018
    Posts:
    3
    Thank you for your reply. I tried to change the structure between CameraRig and Local Avatar. No matter how as the 2 screenshots shown, the problem is still there.

    I added Gaze Interaction before, but I think I've delected it.
    I am an absolute beginner:(:D Screenshot - 1_25_2018 , 12_54_50 PM.jpg Screenshot - 1_25_2018 , 12_55_40 PM.jpg
     
  4. Matt_D_work

    Matt_D_work

    Unity Technologies

    Joined:
    Nov 30, 2016
    Posts:
    202
    ok, so, see how your "TrackingSpace" is a child of the "OVRCameraRig" in the second image, and "LocalAvatar" and "TrackingSpace" are in the first image.

    this means, that those items will inherit the camera's transform.

    its a bit like how your clothes follow you when you move about, in unity terms, your shoes are "children" of your feet, as you walk around, your shoes follow where your feet go. when you take your shoes off, changing the parent of your shoes from your feet to the room itself. the shoes stay where they are as you move around.
    now both you, and the shoes are children of the "room" node in the hierarchy.

    if we were to move the room through space, we'd expect that both us, and the shoes, move with the room as we're represented in the local space of the room.

    hopefully that kind of conveys the concept.

    what you need to do for this to work is have a hierarchy which looks like

    Root
    - Rig Game Object (this represents the current location of the player in world space)
    -- Camera Game Object (this is driven by the HMD)
    --- Tracked Pose Driver Component in *non* relative mode
    - World Game Objects
    -- Your Scene
     
    congcong612 likes this.
  5. congcong612

    congcong612

    Joined:
    Jan 22, 2018
    Posts:
    3
    Thank you so much! It helped me a lot! And my problem is when I play the game, there is a "VRTK Transform" Script with my local avater. And I can't delect it, it appears everytime when I play.

    Your reply helped me greatly! Thank you!!!:D:D:D;)