GetTouchMove

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

Description


using UnityEngine;
using Volplane;

public class Demo : VolplaneBehaviour
{
    public int playerId;

    void Update()
    {
        // Check for triggered touch area and if finger / input moved
        if(VInput.GetInput(playerId, "touch-area") && VInput.GetTouchMove(playerId, "touch-area"))
        {
            // Write touch coordinates to console
            Debug.Log(VInput.GetCoordinates(playerId, "touch-area"));
        }
    }
}

Indicates whether an input on a touch area was moved.

 

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