Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

always going back to the same position at start + tracking of controllers

Discussion in 'AR/VR (XR) Discussion' started by mmmm01, Mar 22, 2019.

  1. mmmm01

    mmmm01

    Joined:
    Feb 24, 2019
    Posts:
    1
    Hello,


    I have a 360 degree scene where at 12o'clock is my starting point - a tree and at 3pm is a building, 6pm a mountain etc. After the scene, I am switching to a black screen.What is important is

    that I am sitting on a rotating chair and in the dark I change my position to f.ex. 6pm. When I switch on the scene with the tree and building etc. I want to face the tree, but because of headtracking

    I am facing the mountain that is located at 6pm. I tried the InputTracking. Recenter , also disabling the headtracking but nothing works.

    Do you have any suggestions?


    Here comes an additional question as I want to track the position of my controller- I was thinking about delta and vector3 or the quaternion angle? Do you have a piece of advice for me how to track the position of the controller?



    Thank you and best regards,

    Mariya
     
  2. JoeStrout

    JoeStrout

    Joined:
    Jan 14, 2011
    Posts:
    9,859
    Head tracking changes the local position of the camera. You can (and should) put the camera inside some other GameObject, and if you rotate that parent GameObject, it works as you would want (i.e. it rotates the player as expected, regardless of head tracking).

    Controller positions are also tracked as local positions/rotations. These are given as Vector3 (position) and Quaternion (rotation). I'm not really sure what you're asking there.