0 votes
by (380 points)
edited by

环境unity 2021.3
Pico neo3 Unity XR SDK

眼镜Pico neo3 pro

    public void Test2()
{
    if (rightHandController.TryGetFeatureValue(CommonUsages.primary2DAxis, out axis) && !axis.Equals(Vector2.zero))
    {
        //xxxxx相关逻辑
        Debug.Log("处理逻辑primary2DAxis");
    }
}

如何判断4个方向?

1 Answer

+1 vote
by (6.6k points)
selected by
 
Best answer

他这个键值对应的是一个二维坐标系那种的,比如
正上是x=0 y=1
正下就是x=0 y=-1
正左x=-1 y=0
正右x=1 y=0

...