Skip to main content
Up and Coming
October 21, 2017

GearVR controller Not working as expected with Unity 2017.2.0f3

Unity Plus 2017.2.0f3 

OVRPlugin 1.18.1 

GearVR controller 



i start new empty project && I
import the Oculus utilities 1.18.1 only.



i run the project Scene
"GearVrControllerTest".



the controller Orientation
values && all data update only when i press trigger or touch , so 
we need an work around for this problem  

because its working fine in Unity Plus 2017.1.1f1 

Thanks


    This topic has been closed for replies.

    2 replies

    Up and Coming
    October 24, 2017
    Thanks 
    here is my Temporary workaround 

    edit OVRInput.cs  inside Update

    Change:

            // Promote TrackedRemote to Active if one is connected and no other controller is active
    if (activeControllerType == Controller.None)
    {
                if ((connectedControllerTypes & Controller.RTrackedRemote) != 0)
                {
                    activeControllerType = Controller.RTrackedRemote;
                }
                else if ((connectedControllerTypes & Controller.LTrackedRemote) != 0)
                {
                    activeControllerType = Controller.LTrackedRemote;
                }
    }

    To:

            // Promote TrackedRemote to Active if one is connected and no other controller is active
    if (activeControllerType > 0)
    {
                if ((connectedControllerTypes & Controller.RTrackedRemote) != 0)
                {
                    activeControllerType = Controller.RTrackedRemote;
                }
                else if ((connectedControllerTypes & Controller.LTrackedRemote) != 0)
                {
                    activeControllerType = Controller.LTrackedRemote;
                }
    }

    i change activeControllerType  from Controller.None to activeControllerType  > 0
    because we have already an Active Controller but it register to system only when i press trigger Button,
    so with my edit we can force system to 
    register the Controller.

    i have working 
    Controller now inside Unity 2017.2.0f3 .

    hope it help till updating from Oculus.

    Participant
    April 20, 2018
    @MohamedElmazen  Thanks for the patch code, still useful. I just fixed an issue with the Unity Asset Easy GearVR using it... I'm using OVR v 1.21.0