- Home /
When i instantiate a new OVRPlayerController its forward is off
In my game you control a main character which is able to summon shapes and move these around as new characters. looking around is done with the oculus rift and moving with WASD using the oculus OVRPlayerController.
When i summon a shape from the main character and take control of it the camera forward and the movement forward do not align anymore. But this only happens if i rotate my main character before instantiating the shape, if i look straight forward (e.g directly after starting the game) they do align.
cube = Instantiate(cubePreFab, new Vector3 (mainCharacterController.transform.position.x, mainCharacterController.transform.position.y, mainCharacterController.transform.position.z + 5), mainCharacterCameraRig.transform.rotation) as GameObject;
i have tried to use Quaternion.Identity aswel but with the same result. OVRManager.display.RecenterPose(); doesn't solve it either, this will only make the camera move to its center pose, but the forward is still askew, i tried setting the forward with transform.Rotate and transform.rotation but that didn't help either.
thanks in advance for any suggestions, if you require any more information/scripts just ask.
same problem. Did you find a way? The weird part is that when i pull it from the inspector of the editor to the scene it works..
sadly i have not been able to get a solution to the problem, i worked around the issue by restricting the movement of the player while summoning the new character so the look and movement angles will always line up
Your answer