Example #1
0
        private float CheckScrollbarValue()
        {
            switch (_rayHoldingHandle)
            {
            case ERayOrigin.LEFT_HAND:
                return(_scrollableSetup.SetComponentNewValue(_minPosBar.position, _maxPosBar.position, InteractionVariableContainer.CurrentLeftHitPosition));

            case ERayOrigin.RIGHT_HAND:
                return(_scrollableSetup.SetComponentNewValue(_minPosBar.position, _maxPosBar.position, InteractionVariableContainer.CurrentRightHitPosition));

            case ERayOrigin.CAMERA:
                return(_scrollableSetup.SetComponentNewValue(_minPosBar.position, _maxPosBar.position, InteractionVariableContainer.CurrentGazeHitPosition));

            default:
                // Never happening
                return(0.0f);
            }
        }
Example #2
0
        protected override void Update()
        {
            base.Update();
            if (Application.isPlaying && _boxColliderSetup)
            {
                CheckClickDown();

                switch (_rayHoldingHandle)
                {
                case ERayOrigin.LEFT_HAND:
                    value = _scrollableSetup.SetComponentNewValue(_minPosBar.position, _maxPosBar.position, InteractionVariableContainer.CurrentLeftHitPosition);
                    break;

                case ERayOrigin.RIGHT_HAND:
                    value = _scrollableSetup.SetComponentNewValue(_minPosBar.position, _maxPosBar.position, InteractionVariableContainer.CurrentRightHitPosition);
                    break;

                case ERayOrigin.CAMERA:
                    value = _scrollableSetup.SetComponentNewValue(_minPosBar.position, _maxPosBar.position, InteractionVariableContainer.CurrentGazeHitPosition);
                    break;
                }
            }
        }