-
Creator 版本:3.7
-
目标平台:WIN10 chrome
-
重现方式:
-
首个报错:
-
之前哪个版本是正常的:
-
手机型号:
-
手机浏览器:
-
编辑器操作系统:WIN10
-
重现概率:
const touch = event.touch!;
this.cameraCom.screenPointToRay(touch.getLocationX(), touch.getLocationY(), this._ray);
if (PhysicsSystem.instance.raycast(this._ray)) {
const raycastResults = PhysicsSystem.instance.raycastResults;
for (let i = 0; i < raycastResults.length; i++) {
const item = raycastResults[i];
for(let i005=0;i005<this.targetNode.length;i005++){
if (item.collider.node == this.targetNode[i005]) {
console.log( "click:" +item.collider.node.name);
break;
}
}
}
console.log(" ");
} else {
console.log('raycast does not hit the target node !');
}
这个API的射线检测法返回的结果不能体现出第一个碰撞到的网格,请问有没有碰撞后不漏的并且返回第一个被碰撞网格的API?