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

大约有 73 项符合查询结果, 库内数据总量为 30,724 项。 (搜索耗时: 0.0064 秒)

21. [LayaAir2]字节小游戏物理的坐标不一样,碰撞盒会比laya的小,物理的位置也不一样 [ 83%]

... Laya.Physics.I.allowSleeping = false;         this.strWorldRoot= this.owner.scene.strWorldRoot;         Laya.Physics.I.worldRoot = this.strWorldRoot;     }     onUpdate(): void {         var playerPos=new Laya.Point(this.cameraPlayerOffset.x,this.cameraPlayerOffset.y);         v...

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

22. 组件属性的代码使用 · LayaAir3.0文档 · LAYABOX [ 82%]

...nderer: Laya.ShurikenParticleRenderer; onAwake(): void { (this.p3dRenderer.owner as Laya.Sprite3D).transform.localPosition = new Laya.Vector3(0,5,5); this.p3dRenderer.particleSystem.simulationSpeed = 10; } 通过暴露@property( { type : Laya.ShurikenParticleRenderer } )组件类型属性,来拖...

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

23. [0]Laya3.0.3 的VideoNode不支持在微信浏览器中播放 [ 81%]

....0.3 的VideoNode不支持在微信浏览器中播放 let videoNode = this.owner.getChildByName("VideoNode") as Laya.VideoNode; videoNode.source = 'xxx.mp4'; videoNode.play(); // 上面代码在PC端安卓苹果等自带浏览器支持视频播放,但是在微信浏览器无任何显示。 let mat...

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

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

...rue;         this.twoFirst = true; } onStart(){ this._scene = this.owner.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 touchCo...

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

25. albedoColor,是会把所有用到这个材质的反照率颜色都改变吗? [ 80%]

...某个架的时候,我获取点击的子节点改变反照率颜色 this.owner.getChildAt(0).meshRenderer.sharedMaterial.albedoColor = new Laya.Vector4(0.0, 1.0, 0.0, 1.0); 然后,所有架子的这个子节点都改变了.   附件 : --> 2019-04-16 添加评论 免费帖 --> 分享 微博 QZONE ...

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

26. 判断玩家在地面还在空中 [ 79%]

...  var ray = new Laya.Ray(vec3,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     } ...

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

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

...D; private camera : Laya.Camera; private scene: Laya.Scene;  public _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):v...

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

28. UI运行时 · LayaAir3.0文档 · LAYABOX [ 78%]

... RuntimeScript; onStart() { // 获得场景的Runtime对象 this.ui = this.owner.scene as RuntimeScript; // Button添加鼠标事件,让Image不显示 this.ui.Button.on( Laya.Event.MOUSE_DOWN, null, ()=>{ this.ui.Image.visible = false; }); } } ui 属性直接从脚本中通过 this.owner.scene ...

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

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

...rue;         this.twoFirst = true; } onStart(){ this._scene = this.owner.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 touchCo...

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

30. 摄像机的viewportPointToRay报错 [ 77%]

...a); PanelMgr.mainCamera.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...

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