public static float GetSwipeDegree(int playerId, string elementName, bool align = false);
public static float GetSwipeDegree(VPlayer player, string elementName, bool align = false);


using UnityEngine;
using Volplane;

public class Demo : VolplaneBehaviour
    public int playerId;

    void Update()
        // Check for triggered swipe field
        if(VInput.GetInput(playerId, "swipe-field"))
            float angle = GetSwipeDegree(playerId, elementName, true);

            // Rotate to match swipe angle
            transform.rotation = Quaternion.Euler(0f, angle, 0f);

Returns the calculated angle in degree of a triggered swipe field. This method only returns valid data when used with an analog swipe field.


playerId The player identifier.
player A player object.
elementName The name identifier of the input element set in the controller editor.
align Align the calculated angle to the global up vector (an angle of 0 will point upwards).