@pzhifeng 写道:
参考射线检测的demo,将射线检测中,用点击屏幕的获取射线目标点,换成一个准心图标,检测结果位置有偏移。屏幕中间的准心点,需要做怎样的转换啊。
demo中,this.ami 是加在屏幕中的准心,做以下修改:
this.cameraCom.screenPointToRay(touch.point.x, touch.point.y, this._ray);
this.cameraCom.screenPointToRay(this.ami.node.worldPosition.x,this.ami.node.worldPosition.y, this._ray);
帖子: 1
参与者: 1