void Update() { for (int i = 0; i < psMoveWrapper.moveCount; i++) { if (psMoveWrapper.moveConnected[i] && psMoveWrapper.WasPressed(i, PSMoveWrapper.CIRCLE)) { Instantiate(ball, transform.position, transform.rotation); } } }
void Update() { jump = false; if (characterController == null || !characterController.grounded) { return; } if ((Input.GetButtonDown("Jump") || JumpGestureTriggered())) { shouldJump = true; } if (useRazerHydra) { razerController = SixenseInput.GetController(razerHydraID); if (razerController != null && razerController.Enabled) { if (razerController.GetButtonDown(SixenseButtons.BUMPER)) { shouldJump = true; } } } // Check if jumping with PS Move Navigation controller if (usePSNavigationController && moveWrapper && moveWrapper.isConnected) { if (PSNaviControllerID <= moveWrapper.navConnected.Length && PSNaviControllerID >= 1) { if (moveWrapper.navConnected[PSNaviControllerID - 1]) { if (moveWrapper.WasPressed(PSNaviControllerID - 1, "NavL1")) { shouldJump = true; } } } } if (shouldJump) { jump = true; } }
private void DoWaitingForMovePress() { statusText.text = "Take a Move controller into your right hand.\nWave the controller around until\nthe pitch angle seems to converge.\nPress X to start calibrating.\n"; if (kinectSelection.GetNumberOfSelectedPlayers() < 1) { currentState = State.WaitingForSkeleton; } for (int i = 0; i < 4; i++) { if (psMoveWrapper.sphereVisible[i] && psMoveWrapper.isButtonCross[i]) { currentState = State.Calibrating; numberOfSamplesTaken = 0; calibratingPSMoveControllerId = i; foreach (GameObject sphere in calibrationSpheres) { Destroy(sphere); } calibrationSpheres = new List <GameObject>(); rawPSMoveSamples = new List <Vector3>(); psMoveSamples = new List <Vector3>(); kinectSamples = new List <Vector3>(); coordinateSystem.ResetTransforms(); UpdateFloorNormal(); } if (psMoveWrapper.sphereVisible[i] && psMoveWrapper.WasPressed(i, PSMoveWrapper.TRIANGLE)) { UpdateFloorNormal(); } } }