/// <summary>
        /// Processes the event and re-emits the data via the <see cref="Vector2Action"/>.
        /// </summary>
        /// <param name="action">The action raising the event.</param>
        /// <param name="source">The source of the input.</param>
        /// <param name="value">The value of the raised event.</param>
        /// <param name="delta">The delta value between now and the previous raised event.</param>
        protected virtual void Listener(SteamVR_Behaviour_Vector2 action, SteamVR_Input_Sources source, Vector2 value, Vector2 delta)
        {
            switch (AxisValue)
            {
            case ValueType.Actual:
                Receive(value);
                break;

            case ValueType.Delta:
                Receive(delta);
                break;
            }
        }
Esempio n. 2
0
    public void OnTouchpadChanged(SteamVR_Behaviour_Vector2 behaviour, SteamVR_Input_Sources source, Vector2 newAxis, Vector2 newDelta)
    {
        if (point == null)
        {
            return;
        }
        int newDirection = (int)(newAxis.x * 4 / 3);

        if (newDirection != direction && newDirection != 0)
        {
            pathRenderer.MovePoint(point.transform.GetSiblingIndex(), newDirection);
            point.transform.SetSiblingIndex((point.transform.GetSiblingIndex() + newDirection + point.transform.parent.childCount) % point.transform.parent.childCount);
            pathRenderer.Recalculate();
        }
        direction = newDirection;
    }
 public void OnTouchpadChanged(SteamVR_Behaviour_Vector2 behaviour, SteamVR_Input_Sources source, Vector2 newAxis, Vector2 newDelta)
 {
     direction = newAxis.y;
 }