大约有 34 项符合查询结果, 库内数据总量为 30,786 项。 (搜索耗时: 0.0034 秒)
...,进行射线检测。效果如(图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
this.scene.physicsSimulation.rayCastAll 报错 this.point.x = Laya.MouseManager.instance.mouseX; this.point.y = Laya.MouseManager.instance.mouseY; //产生射线 this.camera.viewportPointToRay(this.point,this.ray); /// Laya.PhysicsSimulation.rayCast(this.ray, this.outHitResult, 30, 0) //拿到...
来源: Laya_社区 发布时间: 20190523
...a.Vector3(0, 0, 0)) let pointVec2 = new Laya.Vector2( ) pointVec2.x = Laya.MouseManager.instance.mouseX; pointVec2.y = Laya.MouseManager.instance.mouseY; this.sceneCamera.viewportPointToRay(pointVec2, this.originRay) // 摄像机发出射线检测的碰撞体 let cameraHitResult = new Laya.HitResult...
来源: Laya_社区 发布时间: 20200617
...nction checkHit() { //从屏幕空间生成射线 point.elements[0] = Laya.MouseManager.instance.mouseX; point.elements[1] = Laya.MouseManager.instance.mouseY; camera.viewportPointToRay(point, ray); //射线检测获取所有检测碰撞到的物体 Laya.Physics.rayCastAll(ray, _outHitAllInfo, 30, 0...
来源: Laya_示例 发布时间: 20241125
...嘛.... 2018-02-27 0 0 分享 微博 QZONE 微信 c416288806 赞同来自: MouseManager.instance.mouseX代替Laya.stage.mouseX,就没有问题了。屏幕上的坐标可以用摄像机获取视窗的大小,然后根据需要做换算...PS:laya的大佬们能不能把备注稍微写全一点......
来源: Laya_社区 发布时间: 20180227
...UI点击穿透的问题 //从屏幕空间生成射线 point.elements[0] = MouseManager.instance.mouseX; point.elements[1] = MouseManager.instance.mouseY; camera.viewportPointToRay(point, ray); //射线检测获取所有检测碰撞到的物体 Physics.rayCastAll(ray, _outHitAll...
来源: Laya_社区 发布时间: 20180120
...); var outHitResult: Laya.HitResult = new Laya.HitResult(); point.x = Laya.MouseManager.instance.mouseX; point.y = Laya.MouseManager.instance.mouseY; console.log("rayPoint111 pointx:"+ point.x+" pointy:"+point.y+ " ray.origin.x:"+ray.origin.x+ " ray.origin.y:"+ray.origin.y+ " ray.origin.z:"+ray.orig...
来源: Laya_社区 发布时间: 20191219
...e onMouseDown():void{ this.camera.viewportPointToRay(new Laya.Vector2(Laya.MouseManager.instance.mouseX,Laya.MouseManager.instance.mouseY),this.ray); Laya.Physics.rayCast(this.ray,this.hit); console.log("当前射线碰撞的信息是:" + this.hit.sprite3D.name); //摄像机位置 var position:Laya....
来源: Laya_社区 发布时间: 20181020
...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