Forum Discussion
GarrettSkye
8 years agoMHCP Member
OVRInput.GetUp not working correctly in Unity 2017.2 with GearVR Controller
So, I seem to have encountered an issue in Unity 2017.2 with Oculus Utilities v 1.18.1. Calling OVRInput.GetUp(OVRInput.Button.PrimaryIndexTrigger) does not return true when releasing the trigger on a...
MohamedElmazen
8 years agoProtege
if your unity is 2017.2.0f3
try this
edit OVRInput.cs inside Update
Change:
try this
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:
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 , now I just test OVRInput.GetDown & GetUp its work fine.
hope it help
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 , now I just test OVRInput.GetDown & GetUp its work fine.
hope it help
Quick Links
- Horizon Developer Support
- Quest User Forums
- Troubleshooting Forum for problems with a game or app
- Quest Support for problems with your device