获取当前控制器触摸板的触摸位置向量。
Parameter Name |
Parameter Type |
Description |
|---|---|---|
pos |
Vector2 |
将当前控制器的位置向量(x,y)写入pos |
手柄触摸板获取到的位置向量的坐标系如下所示,使用时需根据实际坐标系作转换:

if (null == controller) {
Debug.LogError("Controller is null");
} else {
Vector2 touchpdPos = new Vector2();
int ret = controller.GetTouchpadTouchPos(ref touchpdPos);
if (ret == 0) {
Debug.Log("Get controller touchpdPos success!");
} else {
Debug.Log("Get controller touchpdPos failed!");
}
}