• 首页
  • 动态
  • 案例
  • 引擎社区
  • API
  • 文档
  • 示例
  • 引擎下载

大约有 34 项符合查询结果, 库内数据总量为 31,560 项。 (搜索耗时: 0.0039 秒)

11. 射线检测报错,outHitInfo.sprite3D=null; [ 77%]

...load(owner : any):void{ this.scene = owner; this.camera = this.scene.scene.getChildByName("Main Camera") as Laya.Camera; console.log("当前摄像机的名字是:" + this.camera.name); }  public _start(state:Laya.RenderState):void{ this.ray = new Laya.Ray(Laya.Vector3.ZERO,Laya.Vector3.ZERO); thi...

来源: Laya_社区 发布时间: 20181020

12. 组件脚本的内置方法 · LayaAir3.3 · 引擎文档 · LAYABOX [ 77%]

...{ this._level = Math.round(Math.random() * 5) + 1; this._text = this.owner.getChildByName("levelTxt") as Laya.Text; this._text.text = this._level + ""; } //每帧更新时执行 onUpdate(): void { //让持续盒子旋转 (this.owner as Laya.Sprite).rotation++; } //开始碰撞时执行 onTriggerEnte...

来源: Laya3.0_文档 发布时间: 20251010

13. 加载.lh文件 运行后黑屏 无法显示 [ 76%]

...er.parent as Laya.Scene3D;         this._text = this._scene.parent.getChildByName("ceshi") as Laya.Text;         this._camera = this._scene.getChildByName("camera") as Laya.Camera; } onUpdate(){ var touchCount = this._scene.input.touchCount();         if (1 === touchCount){ ...

来源: Laya_社区 发布时间: 20190531

14. (实现手指控制模型的缩放旋转)触控可以识别 但是导入的模型没有根据触控反应 [ 76%]

...er.parent as Laya.Scene3D;         this._text = this._scene.parent.getChildByName("ceshi") as Laya.Text;         this._camera = this._scene.getChildByName("camera") as Laya.Camera; } onUpdate(){ var touchCount = this._scene.input.touchCount();         if (1 === touchCount){ ...

来源: Laya_社区 发布时间: 20190605

15. viewportPointToRay产生的射线始终有偏差,是为什么? [ 76%]

... this._phasorSpriter3D = new PhasorSpriter3D(); this._camera = this._owner.getChildByName("Camera") as Camera; } public _postRenderUpdate(state:RenderState):void { super._update(state); this._point.elements[0] = Laya.stage.mouseX; this._point.elements[1] = Laya.stage.mouseY; this._camera.viewportPoi...

来源: Laya_社区 发布时间: 20180201

16. rigidBody.applyForce 物体不会移动 [ 75%]

...(scene); //添加方向光 var directionlight: Laya.DirectionLight = scene.getChildByName( "Directional Light" ) as Laya.DirectionLight; this.directionlight = directionlight; //加入子層人物腳色到舞台 var littleGirl: Laya.Sprite3D = scene.getChildByName( "Girl" ) as Laya.Sprite3D; scene.ad...

来源: Laya_社区 发布时间: 20200917

17. 预设组件挂脚本,添加到场景以后赋值失败 [ 75%]

...值,其它组件的引用全是不对的   但是如果通过this.owner.getChildByName("testLb") 这种方式,就是正常的,这能优化下??????   附件 : --> demo5.zip 2021-10-26 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内...

来源: Laya_社区 发布时间: 20211026

18. 2.0组件式开发Script间互相调用、通信的官方推荐方式是什么呢 [ 74%]

...的api,只能一层一层的找,类似这样 this.owner.parent.parent.getChildByName("a").getChildByName("b"); 2020-03-16 0 0 分享 微博 QZONE 微信 为什么被折叠? 0 个回复被折叠 要回复问题请先登录 发起人 dz5566 相关问题 发起问题须知,必看!!!不按...

来源: Laya_社区 发布时间: 20200311

19. BloomEffect 没有效果啊 [ 74%]

...忙看看 为什么没有效果啊 let camera : Laya.Camera = this.owner.getChildByName("Main Camera") as Laya.Camera ;let postProcess:Laya.PostProcess = new Laya.PostProcess; let bloom:Laya.BloomEffect = new Laya.BloomEffect(); // bloom.color = Laya.Color.RED; bloom.intensity = 0.5; bloom.clamp = 0...

来源: Laya_社区 发布时间: 20190827

20. 按照范例写的碰撞一直检测不到 this.outHitInfo.distance [ 73%]

...中的角色移动碰撞区模型 var moveArea = this.scene.getChildAt(0).getChildByName("MoveArea"); //设置为不渲染 moveArea.meshRender.enable = false; //加载网格碰撞器组件 var sprite3d1MeshCollider=moveArea.addComponent(Laya.MeshCollider); //官方js例子里少了下面这行 sprit...

来源: Laya_社区 发布时间: 20180118