大约有 34 项符合查询结果, 库内数据总量为 30,778 项。 (搜索耗时: 0.0030 秒)
...是做射线碰撞检测. onStageMouseDown(): void { this._rayPt.x = Laya.MouseManager.instance.mouseX; this._rayPt.y = Laya.MouseManager.instance.mouseY; GameManager.instance.mainCamera.viewportPointToRay(this._rayPt, this._ray); let scene = this.owner.scene as Laya.Scene3D; scene.physicsSimulation...
来源: Laya_社区 发布时间: 20190319
... return; } this.lab.pos(Laya.MouseManager.instance.mouseX,Laya.MouseManager.instance.mouseY); } } onStart不是在onUpdate之前执行吗?怎么就会输出一次空呢,搞不懂了.... 2020-06-02 添加评论 免费帖 --> 分享 微博...
来源: Laya_社区 发布时间: 20200602
...件 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
...tion = _quaternion; //从屏幕空间生成射线 point.elements[0] = Laya.MouseManager.instance.mouseX; point.elements[1] = Laya.MouseManager.instance.mouseY; camera.viewportPointToRay(point, ray); //射线检测获取所有检测碰撞到的物体 Laya.Physics.rayCast(ray, _outHitInfo, 30, 0); } (...
来源: Laya_示例 发布时间: 20241118
...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
... //从屏幕空间生成射线 point.elements[0] = Laya.MouseManager.instance.mouseX; point.elements[1] = Laya.MouseManager.instance.mouseY; camera.viewportPointToRay(point, ray); //射线检测获取所有检测碰撞到的物体 Lay...
来源: Laya_社区 发布时间: 20170915
....<RaycastHit> = new Vector.<RaycastHit>(); point.elements[0] = MouseManager.instance.mouseX; point.elements[1] = MouseManager.instance.mouseY; ray.direction.x = 0; ray.direction.y = 0; ray.direction.z = 0; ray.origin.x = 0; ray.origin.y = 0; ray.origin.z = 0; handCamera.viewportPointToRa...
来源: Laya_社区 发布时间: 20171017
...进行射线检测。效果如(图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