Skip to main content
Up and Coming
February 9, 2014

Forcing a predefined OVRPlayerController view/rotation

Hello guys,

I am building a script in which I am changing the location of the user (like predefined points of view in the scene).
No problem to set the position of the OVRPlayerController, but I am struggling with the rotation...

What I want to achieve is really to force the user to a specific camera view, so that after updating the position/location, the camera is turned toward a specific item.
I tried setting the OVRPlayController roration properties, but that does not work, as it is still reflecting the current Rift rotation.
I tried also setting the OVRCameraController rotation, but that does not work. I finally tried using the setYRotation function, no luck either...

Could you advice on how to update the OVRPlayerController rotation so that the user is facing the specific direction (probably ressting the current rotation values)

Thank you
    This topic has been closed for replies.

    12 replies

    Up and Coming
    February 19, 2014
    mrgreen72,

    in fact, I think that calling initializeInputs() method is the best idea.
    I am trying to do this from a script attached to my OVRPlayerController, but I can't find out how to call this function (it is public right?). I know it seems easy, but if I try :
    GetComponent(OVRPlayerController).InitializeInputs();


    it does not work...

    I tried other ways but I can't make it work... Could you maybe help ? I know if has to be so simple !
    Up and Coming
    February 19, 2014
    I also tried :

    private OVRComponent myComponent;
    myComponent = (OVRComponent) GetComponent("OVRPlayer Controller");
    myComponent.InitializeInputs ();


    but does not work either...

    Help?