Skip to main content
New Participant
July 21, 2015

Camera position

Hi,

I have the unity 5.1.2f1 and the Oculus Rift DK2.
When the oculus is off, i can retrieve the Camera.transform.forward vector.
But when i turn on the Oculus, the forward vector stays 0. It only changes when i move the mouse.
I'm using the same camera and i can see all the movements correctly with the oculus on.

What can I do to have the forward axis values moving with the oculus?

Thank you.
    This topic has been closed for replies.

    2 replies

    Inspiring
    July 21, 2015
    Are you using the OVRPlayerController?

    I have some code here for a spectator camera, and transform.forward works OK.

    viewtopic.php?f=37&t=24460#p285046

    Maybe that will give you some ideas.
    AMD Ryzen 7 1800X | MSI X370 Titanium | G.Skill 16GB DDR4 3200 | EVGA SuperNOVA 1000 | Corsair Hydro H110i Gigabyte RX Vega 64 x2 | Samsung 960 Evo M.2 500GB | Seagate FireCuda SSHD 2TB | Phanteks ENTHOO EVOLV
    TagoWillAuthor
    New Participant
    July 21, 2015
    Sorry.
    I found out what was my problem.
    The mouse movement script was overriding the oculus movements. :lol:
    That's why the forward wasn't giving me any value.

    Thank you for the reply. ;)