大约有 40 项符合查询结果, 库内数据总量为 30,778 项。 (搜索耗时: 0.0029 秒)
...件 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
...但下面这么用一直没有东西,求指点 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
... //从屏幕空间生成射线 point.elements[0] = Laya.MouseManager.instance.mouseX; point.elements[1] = Laya.MouseManager.instance.mouseY; camera.viewportPointToRay(point, ray); //射线检测获取所有检测碰撞到的物体 Lay...
来源: Laya_社区 发布时间: 20170915
...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
....<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 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