Ejemplo n.º 1
0
 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)));
     }
 }
Ejemplo n.º 2
0
        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];
        }
Ejemplo n.º 3
0
    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;
        }
    }
Ejemplo n.º 4
0
 private Ray GetRay()
 {
     return(new Ray(_inputController.GetPosition(_controllerType), _inputController.GetForward(_controllerType)));
 }
Ejemplo n.º 5
0
 private void UpdatePose()
 {
     _leftTrans.SetPositionAndRotation(_inputController.GetPosition(ControllerType.Left), _inputController.GetRotation(ControllerType.Left));
     _rightTrans.SetPositionAndRotation(_inputController.GetPosition(ControllerType.Right), _inputController.GetRotation(ControllerType.Right));
 }