大约有 30 项符合查询结果, 库内数据总量为 30,902 项。 (搜索耗时: 0.0039 秒)
...ewportPointToRay(this.point,ray); //拿到射线碰撞的物体 this.scene.physicsSimulation.rayCast(this.ray,this.outHitResult); //如果碰撞到物体 if (this.outHitResult.succeeded) { //删除碰撞到的物体 this.text.text = "碰撞到了" + this.outHitResult.collider.owner.name ; console.lo...
来源: Laya2.0_文档 发布时间: 20210715
...3,new Laya.Vector3(0,0,1)); (this.owner.scene as Laya.Scene3D).physicsSimulation.rayCast(ray,this.outHitResult); if(!this.outHitResult.succeeded){ return false; } return this.outHitResult.collider } 然后使用方法 let obj...
来源: Laya_社区 发布时间: 20190905
...amera.viewportPointToRay(point,_ray); //拿到射线碰撞的物体 _scene.physicsSimulation.rayCast(_ray,_outHitResult); //如果碰撞到物体 if (_outHitResult.succeeded) { //删除碰撞到的物体 text.text = "碰撞到了" + _outHitResult.collider.owner.name ; trace("碰撞到物体!!") ...
来源: Laya2.0_文档 发布时间: 20210715
...测的碰撞体 let cameraHitResult = new Laya.HitResult( ) this.mainScene.physicsSimulation.rayCast(this.originRay, cameraHitResult) 3. 在PixelLineSprite3D上绘制OBJ与鼠标点击位置之间的线段,没有问题。if (cameraHitResult.succeeded){ let toPoint3D = cameraHitResult.point this.li...
来源: Laya_社区 发布时间: 20200617
...l) { if(SceneManager.Instance.nowScene.physicsSimulation.rayCast(ray,this.enemyHit)) { console.log("enemyHit->",this.enemyHit); var _enemy=this.enemyHit.collider.owner as Laya.S...
来源: Laya_社区 发布时间: 20231120
...is._rayPt, this._ray); let scene = this.owner.scene as Laya.Scene3D; scene.physicsSimulation.rayCast(this._ray, this._raycastHit); console.log(this._raycastHit.succeeded); if(this._raycastHit.succeeded) console.log(this._raycastHit.collider.owner.name); } GameManager.instance.mainCamera其实就是...
来源: Laya_社区 发布时间: 20190319
....viewportPointToRay(this.pointRay, this.ray); (this.owner as Laya.Scene3D).physicsSimulation.rayCast(this.ray,this.hitresult); console.log(Laya.MouseManager.instance.mouseX + " -=----------" + Laya.MouseManager.instance.mouseY); if (this.hitresult.succeeded) { console.log(this.hitresult.collider.own...
来源: Laya_社区 发布时间: 20190416
...ointToRay(this.point, this._ray); //拿到射线碰撞的物体 this.scene.physicsSimulation.rayCast(this._ray, this._outHitResult); //如果碰撞到物体 if (this._outHitResult.succeeded) { //删除碰撞到的物体 this.text.text = "点击到了" + this._outHitResult.collider.owner.name; } } } ...
来源: Laya_社区 发布时间: 20200917
...物理射线 在LayaAir 3D中实现射线检测是使用物理模拟器类PhysicsSimulation。 射线检测的方法有4个,分别为射线检测第一个碰撞物体的方法raycast 和 raycastFromTo以及射线检测所有碰撞物体的方法raycastAll和raycastAllFromTo。 检测一个和所...
来源: Laya3.0_文档 发布时间: 20250103
...物理射线 在LayaAir 3D中实现射线检测是使用物理模拟器类`PhysicsSimulation`。 射线检测的方法有4个,分别为射线检测第一个碰撞物体的方法`raycast` 和 `raycastFromTo`以及射线检测所有碰撞物体的方法`raycastAll`和`raycastAllFromTo`。 检测一...
来源: Laya2.0_文档 发布时间: 20210715