Forum Discussion
ChillyNips
8 years agoHonored Guest
OVRPlayerController Rotation around HMD
Hello,
I'm having an problem with player rotation. I'm current using OVRPlayerController for player controller. The issue is that when a player turns the character, the charater rotates about the center of the character. When the player is standing on the edge of the play area, rotations are around the vertical axis in the center of the play area, not the players head location.
How can I change this to obtain rotations about the players HMD location, even when standing at the edges of the play area?
I'm having an problem with player rotation. I'm current using OVRPlayerController for player controller. The issue is that when a player turns the character, the charater rotates about the center of the character. When the player is standing on the edge of the play area, rotations are around the vertical axis in the center of the play area, not the players head location.
How can I change this to obtain rotations about the players HMD location, even when standing at the edges of the play area?
7 Replies
Replies have been turned off for this discussion
- ChillyNipsHonored GuestIve tried setting the character controller "Center" parameters to the location of the HMD CenterCamera (X and Z only), but any non zero parameters for Center on character controller give strange rotations
- ChillyNipsHonored GuestHI,
Thank you for the response. The effect does exist in your sample scene. I will try to explain the issue more clearly.
When using the OVRPlayerController and OVRCameraRig, the Character Controller component is fixed to the center of the tracking Space, while the players head is able to move around the tracking space. When the player moves to the edges of the tracking area, the HMD becomes offset from the Character Controller collider. When the player tries to rotate, this has the effect of the player swinging around a point (like a maypole), rather than rotating about their center axis. For a large tracking area, the effect becomes significant. - DavidJHope777Honored GuestHow is this fixed?
- DavidJHope777Honored Guest
ChillyNips said:
HI,
Thank you for the response. The effect does exist in your sample scene. I will try to explain the issue more clearly.
When using the OVRPlayerController and OVRCameraRig, the Character Controller component is fixed to the center of the tracking Space, while the players head is able to move around the tracking space. When the player moves to the edges of the tracking area, the HMD becomes offset from the Character Controller collider. When the player tries to rotate, this has the effect of the player swinging around a point (like a maypole), rather than rotating about their center axis. For a large tracking area, the effect becomes significant. - DavidJHope777Honored GuestDid you ever get this fixed?
- DrGenomeExplorer
Change line 504 of the OVRPlayerController.cs from:
transform.RotateAround(CameraRig.centerEyeAnchor.position, Vector3.up, euler.y);
to
transform.RotateAround(this.transform.position, Vector3.up, euler.y);This solved it for me.
- Matt-CCExplorer
Anyone solve this?
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
- 3 years ago
- 7 months ago