Exemplo n.º 1
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];
        }
 private Ray GetRay()
 {
     return(new Ray(_inputController.GetPosition(_controllerType), _inputController.GetForward(_controllerType)));
 }