Search Unity

Question How To Get The Direction That The HMD is Pitched Towards

Discussion in 'VR' started by g4qh4, Dec 14, 2022.

  1. g4qh4

    g4qh4

    Joined:
    Dec 15, 2021
    Posts:
    24
    Assume the HMD is pitched downward slightly; how can I turn the pitch into a forward vector so I can move the camera in the direction towards the pitch?
     
    Last edited: Dec 14, 2022
  2. DevDunk

    DevDunk

    Joined:
    Feb 13, 2020
    Posts:
    5,043
    transform.forward gives the forward direction. If you use the transform of the camera you get where the camera is aimed at