Skip to main content
New Participant
August 14, 2013

Rotation of OVRPlayer depending on floor

Hi,

i just started trying the Rift and got stucked.
I got a room with a floor and the character in the middle of the room.
I want to rotate the character, like for example when the floor would rotate.
So the basic rotation comes from the floor but the character can still move his head of course.

I tried writing a script like:
function Update () {transform.Rotate(0, 1, 0);}
and putting it on a floor object and do: OVRCameraController -> Follow Orientation -> Floor-Object.

This doesnt seem to work for me. Then i tried putting this script directly on the CameraController / PlayerController, both didnt work as well.

But what i found out during my researches here in the forum, the Key "Q" is exactly doing what i would love to do programmatically. So i searched the script-files for inspiration but i didnt find the code.

Would be very happy if anyone could give me a hint how to achieve this or where to find the "Code of Button Q" ;D

Thanks in advance.
    This topic has been closed for replies.

    3 replies

    Participant
    August 14, 2013
    Line 253 of OVRPlayerController.cs which is a component of OVRPlayerController
    Inspiring
    August 15, 2013
    You can try using the Unity default First Person Controller, and editing it to work with the OVRCameras.

    See this thread:

    viewtopic.php?f=37&t=3018
    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
    chrissowaAuthor
    New Participant
    August 18, 2013
    hi.
    thanks for the fast responses. I ll try both next week when i get back to work.
    Thanks.