Forum Discussion

🚨 This forum is archived and read-only. To submit a forum post, please visit our new Developer Forum. 🚨
chrissowa's avatar
chrissowa
Honored Guest
12 years ago

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.

3 Replies

Replies have been turned off for this discussion
  • blam's avatar
    blam
    Honored Guest
    Line 253 of OVRPlayerController.cs which is a component of OVRPlayerController
  • hi.
    thanks for the fast responses. I ll try both next week when i get back to work.
    Thanks.