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

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

11. 子弹添加了colliderShape后onUpdate移动,destroy会报错“Cannot read property 'getWorldTransform' of null” [ 75%]

...rShape后onUpdate移动,destroy会报错“Cannot read property 'getWorldTransform' of null” 发射时生成子弹: onFire() { if (this.isFire) { Laya.Mesh.load("fly2/fly3-bullet.lm", Laya.Handler.create(this, function (m) { let bullet = new Laya.MeshSprite3D(m); this.Sn.addChild(bullet); bull...

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

12. Sprite3D添加组件或脚本(JavaScript-3D基础(JS)-LayaAir3D之精灵) [ 73%]

...相机 var camera = scene.addChild(new Laya.Camera(0, 0.1, 100)); camera.transform.translate(new Laya.Vector3(0, 0.8, 1.5)); camera.transform.rotate(new Laya.Vector3(-15, 0, 0), true, false); //创建平行光 var directionLight = scene.addChild(new Laya.DirectionLight()); directionLight.color = new...

来源: Laya2.0_文档 发布时间: 20210714

13. 挂载物体的3D变换问题 [ 72%]

...8); var cylinder3D:MeshSprite3D=new MeshSprite3D(cylinderMesh); cylinder3D.transform.translate(new Vector3(3,0,0),true); cylinder3D.transform.localScale = new Vector3(2,2,2); cylinder3D.transform.localRotationEuler = new Vector3(90,90,90); role.getChildAt(0).addChild(cylinder3D); this.ani.linkSprite...

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

14. Sprite3D添加组件或脚本(TypeScript-3D基础(TS)-LayaAir3D之精灵) [ 72%]

...相机 var camera = scene.addChild(new Laya.Camera(0, 0.1, 100)); camera.transform.translate(new Laya.Vector3(0, 0.8, 1.5)); camera.transform.rotate(new Laya.Vector3(-15, 0, 0), true, false); //创建平行光 var directionLight = scene.addChild(new Laya.DirectionLight()); directionLight.color = new...

来源: Laya2.0_文档 发布时间: 20210715

15. 多点触控的使用(JavaScript-3D基础(JS)-LayaAir3D之鼠标交互) [ 70%]

....y = this.touch.position.y; //根据移动的距离进行旋转 this.owner.transform.rotate(new Laya.Vector3(1 * deltaY /2, 1 * deltaX / 2, 0), true, false); } } else if (2 === touchCount){ this._text.text = "触控点为2"; this.isTwoTouch = true; //获取两个触碰点 var touch = this._scene.inp...

来源: Laya2.0_文档 发布时间: 20210715

16. 多点触控的使用(TypeScript-3D基础(TS)-LayaAir3D之鼠标交互) [ 70%]

....y = this.touch.position.y; //根据移动的距离进行旋转 this.owner.transform.rotate(new Laya.Vector3(1 * deltaY /2, 1 * deltaX / 2, 0), true, false); } } else if (2 === touchCount){ this._text.text = "触控点为2"; this.isTwoTouch = true; //获取两个触碰点 var touch = this._scene.inp...

来源: Laya2.0_文档 发布时间: 20210715

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

...sics.rayCast(this.ray,this.outHitInfo,5)); //更新角色位置 this.owner.transform.translate(new Laya.Vector3(speedX,0,speedZ),false); //播放行走动画   2018-01-18 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容相关的链接 提交 2 个...

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

18. Sprite3D添加组件或脚本(ActionScript-3D基础(AS3)-LayaAir3D之精灵) [ 65%]

... camera:Camera = scene.addChild(new Camera(0, 0.1, 100)) as Camera; camera.transform.translate(new Vector3(0, 0.8, 1.5)); camera.transform.rotate(new Vector3(-15, 0, 0), true, false); //创建平行光 var directionLight:DirectionLight = scene.addChild(new DirectionLight()) as DirectionLight; direct...

来源: Laya2.0_文档 发布时间: 20210714

19. 插件开发说明 · LayaAir3.0文档 · LAYABOX [ 43%]

...prite3D; onSceneGUI(): void { IEditorEnv.Handles.drawHemiSphere(this.owner.transform.position, 2); } onDrawGizmos(): void { IEditorEnv.Gizmos.drawIcon(this.owner.transform.position, "editorResources/UI/ready1.png"); } } 实现效果如下: 2D的实现方式有所不同,它必须通过IEditorEnv....

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

20. 动画状态机详解 · LayaAir3.0文档 · LAYABOX [ 36%]

...出了"); //平移操作 let position = new Vector3(1, 1, 1); this.model.transform.translate(position); } } 在脚本中,当动画结束时,对模型进行了平移。但是由于没有勾选Sleep选项,动画播放完成以后还依然会不停地循环最后一帧,即动图2-4最后的静...

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