public static Vector2 GetSwipeVector(int playerId, string elementName);
public static Vector2 GetSwipeVector(VPlayer player, string elementName);


using UnityEngine;
using Volplane;

public class Demo : VolplaneBehaviour
    public int playerId;

    void Update()
        // Check for triggered swipe field
        if(VInput.GetInput(playerId, "swipe-field"))
            // Output registered swipe vector
            Debug.Log("Swipe detected!");
            Debug.Log(VInput.GetSwipeVector(playerId, "swipe-field"));

Returns the direction vector of a triggered swipe field in 2D space. Digital swipe fields will only register horizontal and vertical axes while analog fields will register the exact swipe direction.


playerId The player identifier.
player A player object.
elementName The name identifier of the input element set in the controller editor.