- Home /
Ovr controller weird rotation
Hello,
I am trying to create a shooting game for occulus gear vr.
My gun which will be controlled by gear vr controller has a script attached with the following code
Quaternion controllerRotation = OVRInput.GetLocalControllerRotation (OVRInput.GetActiveController ());
transform.rotation = Quaternion.Slerp(transform.rotation, rotation, m_Damping (1 - Mathf.Exp(k_DampingCoef Time.deltaTime)));
Now whenever Player transform rotation is set to 0,0,0. player and gun looks like this.
![alt text][2]

But whenever I change the rotation of player to anything other than 0 the gun's rotation is something else. For eg when players rotation is set to 0,90,0 , the view looks like this
I have different different missions in my game and in some missions I have to change the initial rotation. Whenever I change the rotation of player it becomes very hard for the user to bring the gun to the camera view.
How to set players initial gun (gear vr controller) rotation to 0,0,0 ?
Tagged: GearVR GearVRController [2]: /storage/temp/103035-1-1.png
Answer by MushayDroom · Apr 19, 2019 at 08:45 AM
I may use some fixing tips about this trouble. I came into the same issue but in a different situation :
At initialization, the rotation pivot offset of the ovr player is setting itself in a way that while the player is rotating (right xbox joystick controlled) , he's not on the axis on his body. This is a major issue as it increase motion sickness and it move the camera away from the capsule collider of the player controller.
This cause the camera's player to pass through meshs, as there is a difference between the position of it and its associated collider.
I share to you my hierarchy in case it's in any way helpful.

Your answer
Follow this Question
Related Questions
Open GUI on Certain HTC VIVe Controller Angle/Turn 0 Answers
[HTC Vive] Mix Reality using Steam VR without the third controller 0 Answers
Vive Controller getting and Index 0 Answers
Use SteamVR and Vive controller or tracker ONLY for position tracking, no headset 1 Answer
How to get VR controls working again after update to 2019.1.0f2? 0 Answers
