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

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

1. RopeJoint代码动态创建 无法设置otherbody [ 100%]

...     }      onAwake() {         let rig:Laya.RigidBody=this.owner.getComponent(Laya.RigidBody);         var lala=UIcontrol.FUI.bg.getComponent(Laya.RigidBody);         this.rope=this.owner.getComponent(Laya.RopeJoint);         this.rope.otherBody=lala;         console.log(la...

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

2. 2D物理-碰撞事件与传感器 [ 96%]

...ouching[i]) { continue; } let bodyA: RigidBody = this.sensorCollider.owner.getComponent(RigidBody); let bodyB: RigidBody = body.owner.getComponent(RigidBody); let bodyOriA = bodyA.getBody(); let bodyOriB = bodyB.getBody(); let position = bodyOriB.GetPosition(); // let center = bodyOriA.GetPosition()...

来源: Laya2.0_示例 发布时间: 20251130

3. laya2 物理引擎好多问题 [ 95%]

...ggerEnter(e:Laya.RigidBody):void{  var cil:Laya.CircleCollider=this.owner.getComponent(Laya.CircleCollider); var rig:Laya.RigidBody=this.owner.getComponent(Laya.RigidBody); cil.enabled=false; rig.enabled=false; var self:Laya.Sprite= this.owner as Laya.Sprite; var ni:Laya.Animation=new Laya.Animatio...

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

4. [LayaAirIDE3]2d相机打包后问题 [ 93%]

...    // 初始化组件引用         this.playerScript = this.player.getComponent(Player);         this.joystickScript = this.joystick.getComponent(Joystick);         this.cameraController = this.camera.getComponent(CameraController);          // 设置边界参数         con...

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

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

...每帧更新时执行,尽量不要在这里写大循环逻辑或者使用getComponent方法 onLateUpdate 每帧更新时执行,在onUpdate之后执行,尽量不要在这里写大循环逻辑或者使用getComponent方法 onPreRender 渲染之前执行 onPostRender 渲染之后执行 onDisable ...

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

6. 2.6.1物理bug [ 87%]

...:PhysicsCollider = this.basketballCourt.getChildByName("BasketballCourt1").getComponent(PhysicsCollider); collision.restitution = 0.1; this.ball = this.scene3D.getChildByName("Ball") as Sprite3D; this.ball.addComponent(BallScript2)   BallScript2  onAwake   this.ball = this.owner as Sprite3D; thi...

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

7. 角色控制器 · LayaAir3.3 · 引擎文档 · LAYABOX [ 86%]

...件并赋值给 characterController this.characterController = this.owner.getComponent(Laya.CharacterController); //设置出生点位置 this.characterController.position = new Laya.Vector3(0, 0, 0); } } 4.2 角色移动 move() 角色移动用于通过指定移动向量来移动角色。 在代码...

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

8. 2.6物理问题 [ 85%]

...:PhysicsCollider = this.basketballCourt.getChildByName("BasketballCourt1").getComponent(PhysicsCollider); collision.restitution = 0.1; this.ball = this.scene3D.getChildByName("Ball") as Sprite3D; this.ball.addComponent(BallScript2)   BallScript2  onAwake   this.ball = this.owner as Sprite3D; thi...

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

9. 动态添加addComponent(Laya.RigidBody)的问题 [ 84%]

.... 2.但如果将Laya.RigidBody组件直接挂在预制体上,用this.owner.getComponent(Laya.RigidBody)设置后,在调用  this.owner.removeSelf()则不会抛错。   附件 : --> 2020-01-19 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容相...

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

10. 实体组件系统 · LayaAir3.3 · 引擎文档 · LAYABOX [ 83%]

...每帧更新时执行,尽量不要在这里写大循环逻辑或者使用getComponent方法 onLateUpdate 每帧更新时执行,在onUpdate之后执行,尽量不要在这里写大循环逻辑或者使用getComponent方法 onPreRender 渲染之前执行 onPostRender 渲染之后执行 onDisable ...

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