Forum Discussion
chrissowa
12 years agoHonored Guest
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:
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.
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
- blamHonored GuestLine 253 of OVRPlayerController.cs which is a component of OVRPlayerController
- cyberealityGrand ChampionYou 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 - chrissowaHonored Guesthi.
thanks for the fast responses. I ll try both next week when i get back to work.
Thanks.
Quick Links
- Horizon Developer Support
- Quest User Forums
- Troubleshooting Forum for problems with a game or app
- Quest Support for problems with your device
Other Meta Support
Related Content
- 6 months ago
- 3 years ago