大约有 20 项符合查询结果, 库内数据总量为 30,778 项。 (搜索耗时: 0.0033 秒)
...初始化) //获取鼠标在屏幕空间位置 this.pointRay.x = Laya.MouseManager.instance.mouseX; this.pointRay.y = Laya.MouseManager.instance.mouseY; //详设计产生射线方法,通过2D坐标获取与屏幕垂直的一条射线 console.log( PanelMgr.mainCamera); PanelMgr.mainCamera.viewp...
来源: Laya_社区 发布时间: 20190416
...transform.rotate(this.rotation, false); } mouseDown(){ this.point.x = Laya.MouseManager.instance.mouseX; this.point.y = Laya.MouseManager.instance.mouseY; //产生射线 this.camera.viewportPointToRay(this.point, this.ray); var out = new Laya.CannonHitResult(); this.scene.cannonPhysicsSimulation.ray...
来源: Laya_社区 发布时间: 20200903
...但下面这么用一直没有东西,求指点 this.mousePos=new Vector2(MouseManager.instance.mouseX, MouseManager.instance.mouseY); camera.viewportPointToRay(this.mousePos,ray); this.ps.rayCast(ray,this.rayCastHit,500, 0); 2018-12-20 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有...
来源: Laya_社区 发布时间: 20181220
...honeyzzzz • 2017-04-24 10:07 问题解决了, this.point.elements[0] = MouseManager.instance.mouseX;//用Laya.stage.mouseX有问题,在SCALE_SHOWALL下 this.point.elements[1] = MouseManager.instance.mouseY; cuixueying • 2017-04-24 10:21 厉害!
来源: Laya_社区 发布时间: 20170421
...ya.Vector2 = new Laya.Vector2(); screenPoint.x = Laya.MouseManager.instance.mouseX; screenPoint.y = Laya.MouseManager.instance.mouseY; // console.log(screenPoint); let touchRay:Laya.Ray = new Laya.Ray(new Laya.Vector3(0, 0,...
来源: Laya_社区 发布时间: 20220117
... 个回复 158*****364 赞同来自: this.mousePos = new Laya.Vector2(Laya.MouseManager.instance.mouseX, Laya.MouseManager.instance.mouseY); //鼠标点击屏幕产生射线 this.camera.viewportPointToRay(this.mousePos, this.ray); var phy:Laya.PhysicsSimulation =new Laya.Phy...
来源: Laya_社区 发布时间: 20190505
...是做射线碰撞检测. 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
... //从屏幕空间生成射线 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