Pose IAvatarController.GetHandPose(AvatarPoseType type) { if (type == AvatarPoseType.Left) { return(new Pose(_inputController.GetPosition(ControllerType.Left), _inputController.GetRotation(ControllerType.Left))); } else { return(new Pose(_inputController.GetPosition(ControllerType.Right), _inputController.GetRotation(ControllerType.Right))); } }
private void UpdatePose() { transform.SetPositionAndRotation(_inputController.GetPosition(_controllerType), _inputController.GetRotation(_controllerType)); float dist = _laserDistance; if (TryLaserCollision(out float hitDistance)) { dist = hitDistance; } _positions[0] = _inputController.GetPosition(_controllerType); _positions[1] = _positions[0] + _inputController.GetForward(_controllerType) * dist; _lineRenderer.SetPositions(_positions); _reticle.position = _positions[1]; }
void Update() { //Debug.Log ( "playerHealthController.GetCurrentHP () = " + playerHealthController.GetCurrentHP () ); if (playerInputController.GetPosition().y < -10.0f) { SpawnPlayer(); } if (specialBox.transform.position.y < -10.0f) { SpawnBox(); } if (playerInputDisableTimer != null) { playerInputDisableTimer.updateTimer(Time.deltaTime); } if (playerInputDisableTimer != null && playerInputDisableTimer.stopped()) { playerInputController.EnableInput(); playerInputDisableTimer = null; } }
private Ray GetRay() { return(new Ray(_inputController.GetPosition(_controllerType), _inputController.GetForward(_controllerType))); }
private void UpdatePose() { _leftTrans.SetPositionAndRotation(_inputController.GetPosition(ControllerType.Left), _inputController.GetRotation(ControllerType.Left)); _rightTrans.SetPositionAndRotation(_inputController.GetPosition(ControllerType.Right), _inputController.GetRotation(ControllerType.Right)); }