3.8.7转换坐标后的结果一直为NaN

touchStartEvent(event) {

    const screenLoc = event.getLocation();

    const uiTransform = this.cardNode.getComponent(UITransform);

    let point = uiTransform.convertToNodeSpaceAR(screenLoc);

    // 这里的point 一直为NaN,转换前的screenLoc是正常的。

    console.log('[START] 转换后的 point:', point);

    if (isNaN(point.x) || isNaN(point.y)) {

        console.error('❌ 虽然 screenLoc 有效,但转换后变成了 NaN');

    }

   

    this.clearMask(point);

}

代码见上,第一次用3.x开发,不太明白哪里的问题。脚本挂载在Canvas上,Canvas应该是正常的。cardNode节点的scale属性也不为0.请教一下,有同学遇到过这个问题吗?

event.getUILocation()

event.getLocation()
这里得到的是vec2类型的吧。
convertToNodeSpaceAR
这里需要的是vec3
初步看到的问题是这个。