sorry if this isn’t formatted properly, this is my first post. I cant seem to find any examples of the XR joystick variable(primary2daxis). the docs say it is in some form a Vector2, but it produces this error:
Severity Code Description Project File Line Suppression State
Error CS0029 Cannot implicitly convert type ‘UnityEngine.XR.InputFeatureUsage<UnityEngine.Vector2>’ to ‘UnityEngine.Vector2’ Assembly-CSharp G:\vr\Assets\movement.cs 19 Active
apparently this means it is actually not a vector 2. Here is my code, all it tries to do is record this value to a vector 2:
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.XR;
public class movement : MonoBehaviour
{
// Start is called before the first frame update
void Start()
{
}
// Update is called once per frame
void Update()
{
Vector2 joyst2d = CommonUsages.primary2DAxis;
}
}
btw im using version 2019.4.13f