GetInput

public static bool GetInput(int playerId, string elementName);
public static bool GetInput(VPlayer player, string elementName);

Description

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"));
        }
    }
}

Indicates whether an input element has been triggered. This method can be used for swipe fields and touch areas. For buttons, please use the GetButton(), GetButtonDown() and GetButtonUp() method.

 

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