Last active
May 22, 2018 17:40
-
-
Save lyokato/4bed94fb2437f9f12f43a23e7dcc0ded to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static ControllerState4 GetControllerState4(uint controllerMask) | |
{ | |
#if UNITY_EDITOR | |
if (controllerMask == (uint)OVRInput.Controller.RTrackedRemote) { | |
ControllerState4 state = new ControllerState4(); | |
state.ConnectedControllers = (uint)Controller.RTrackedRemote; | |
state.RIndexTrigger = OVROSX.JoyconTracker.Instance.GetTriggerState() ? 1.0f : 0.0f; | |
return state; | |
} else { | |
ControllerState4 controllerState = new ControllerState4(); | |
return controllerState; | |
} | |
#else | |
if (version >= OVRP_1_16_0.version) | |
{ | |
ControllerState4 controllerState = new ControllerState4(); | |
OVRP_1_16_0.ovrp_GetControllerState4(controllerMask, ref controllerState); | |
return controllerState; | |
} | |
return new ControllerState4(GetControllerState2(controllerMask)); | |
#endif | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment