private void ControllerPoseDataEvent(HoloeverEmulatorClientSocket.ControllerPoseData data) { Loom.QueueOnMainThread((param) => { HoloeverEmulatorClientSocket.ControllerPoseData controllerPoseData = (HoloeverEmulatorClientSocket.ControllerPoseData)param; int ControllerButton = IsRightControllerConenct ? controllerPoseData.rightControllerButton : controllerPoseData.leftControllerButton; bool MenuDown = (ControllerButton & (1 << (int)ControllerButtonID.Menu)) != 0; bool TouchPadDown = (ControllerButton & (1 << (int)ControllerButtonID.TouchPad)) != 0; if (MenuDown) { KeyStateController3DOF[CKeyEvent.KEYCODE_CONTROLLER_MENU] = CKeyEvent.ACTION_DOWN; } else { KeyStateController3DOF[CKeyEvent.KEYCODE_CONTROLLER_MENU] = CKeyEvent.ACTION_UP; } if (TouchPadDown) { KeyStateController3DOF[CKeyEvent.KEYCODE_CONTROLLER_TOUCHPAD] = CKeyEvent.ACTION_DOWN; } else { KeyStateController3DOF[CKeyEvent.KEYCODE_CONTROLLER_TOUCHPAD] = CKeyEvent.ACTION_UP; } }, data); }
private void ControllerPoseDataEvent(HoloeverEmulatorClientSocket.ControllerPoseData data) { Loom.QueueOnMainThread((param) => { HoloeverEmulatorClientSocket.ControllerPoseData controllerPoseData = (HoloeverEmulatorClientSocket.ControllerPoseData)param; HoloeverEmulatorClientSocket.TrackingQuat quat = controllerPoseData.right_controller_Pose_Orientation; NxrPlayerCtrl.Instance.EditorRemoteQuat = new Quaternion(quat.x, quat.y, quat.z, quat.w); }, data); }