大约有 8 项符合查询结果, 库内数据总量为 30,778 项。 (搜索耗时: 0.0022 秒)
...件 onMouseDown() { //记录点击到舞台上的点 this.point.x = Laya.MouseManager.instance.mouseX; this.point.y = Laya.MouseManager.instance.mouseY; //产生射线 this.camera.viewportPointToRay(this.point,ray); //拿到射线碰撞的物体 this.scene.physicsSimulation.rayCast(this.ray,this.out...
来源: Laya2.0_文档 发布时间: 20210715
...件 onMouseDown() { //记录点击到舞台上的点 this.point.x = Laya.MouseManager.instance.mouseX; this.point.y = Laya.MouseManager.instance.mouseY; //产生射线 this.camera.viewportPointToRay(this.point,ray); //拿到射线碰撞的物体 this.scene.physicsSimulation.rayCast(this.ray,this.out...
来源: Laya2.0_文档 发布时间: 20210715
...e function onMouseDown():void { //记录点击到舞台上的点 point.x = MouseManager.instance.mouseX; point.y = MouseManager.instance.mouseY; //产生射线 _camera.viewportPointToRay(point,_ray); //拿到射线碰撞的物体 _scene.physicsSimulation.rayCast(_ray,_outHitResult); //如果碰撞...
来源: Laya2.0_文档 发布时间: 20210715
...进行射线检测。效果如(图5) ```typescript this.point.x = Laya.MouseManager.instance.mouseX; this.point.y = Laya.MouseManager.instance.mouseY; //产生射线 this.camera.viewportPointToRay(this.point,this._ray); //拿到射线碰撞的物体 this.scene.physicsSimulation.rayCast(this._ray...
来源: Laya2.0_文档 发布时间: 20210715
...射线,进行射线检测。效果如(图5) ```typescript point.x = MouseManager.instance.mouseX; point.y = MouseManager.instance.mouseY; //产生射线 _camera.viewportPointToRay(point,_ray); //拿到射线碰撞的物体 _scene.physicsSimulation.rayCast(_ray,outs); //如果碰撞到物体 if...
来源: Laya2.0_文档 发布时间: 20210715
...,进行射线检测。效果如(图5) ```typescript this.point.x = MouseManager.instance.mouseX; this.point.y = MouseManager.instance.mouseY; //产生射线 this._camera.viewportPointToRay(this.point,this._ray); //拿到射线碰撞的物体 this._scene.physicsSimulation.rayCast(this._ray,this...
来源: Laya2.0_文档 发布时间: 20210715
...ript mouseDown(){ //获取鼠标点击位置的屏幕坐标 this.point.x = MouseManager.instance.mouseX; this.point.y = MouseManager.instance.mouseY; //由点击的屏幕坐标产生射线 this.camera.viewportPointToRay(this.point, this.ray); //创建CannonHitResult对象来存储射线检测结果 ...
来源: Laya2.0_文档 发布时间: 20210715
...ript mouseDown(){ //获取鼠标点击位置的屏幕坐标 this.point.x = MouseManager.instance.mouseX; this.point.y = MouseManager.instance.mouseY; //由点击的屏幕坐标产生射线 this.camera.viewportPointToRay(this.point, this.ray); //创建CannonHitResult对象来存储射线检测结果 ...
来源: Laya2.0_文档 发布时间: 20210714