getBoundingBox 好像有bug

我用getBoundingBox来判断触摸的移动是否还在图片之内,这是我的code
touchMove:function(event){
let box = this.node.getBoundingBox();
if (box.contains(this.node.convertToNodeSpace(event.getLocation()))) {
console.log(“in the box”);
} else {
console.log(“out of the box”);
}
}
我这个脚本绑定在一个Sprite上,这个Sprite是一个prefab的子节点,这个sprite的BoundingBox是x=-92 y=-92 height=184 width=184
我发现this.node.convertToNodeSpace(event.getLocation())打印出来的值x在-92~92,y在-92~92之间的时候显示在box内。这样是不对的应该是x在0~184,y在0~184显示在box内

试试 convertToNodeSpaceAR