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

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

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

... Laya.stage.addChild(img2); sp=img2; img2.addComponent(BoxCollider); (img2.getComponent(BoxCollider) as BoxCollider).width=256; (img2.getComponent(BoxCollider) as BoxCollider).height=256; img2.addComponent(RigidBody); img.addComponent(BoxCollider); (img.getComponent(BoxCollider) as BoxCollider).widt...

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

2. Getcomponent 报错Uncaught (in promise) TypeError: Right-hand side of 'instanceof' is not an object [ 94%]

Getcomponent 报错Uncaught (in promise) TypeError: Right-hand side of 'instanceof' is not an object 有复现工程  附件 : --> Laya2DTest.zip 2023-07-03 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容相关的链接 提交 2 个回复 layabox...

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

3. Laya2D碰撞问题 [ 92%]

...Laya.RigidBody['objs'][i]; if(element) if(element.owner){ if(element.owner.getComponent(Laya.CircleCollider)){return} if(element.owner.getComponent(Laya.BoxCollider)){ element['_sysPosToPhysic'](); element.owner.getComponent(Laya.BoxCollider)['resetShape'](); element['resetCollider'](); element.owne...

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

4. laya2 物理引擎好多问题 [ 91%]

...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

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

...     }      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

6. 添加或修改物理ChainCollider属性points时,报错 [ 87%]

...llider,使用代码更改属性points,则报错 var chains=this.sprite.getComponent(Laya.ChainCollider); (chains as Laya.ChainCollider).points="25,25,50,50"; 2018-11-28 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容相关的链接 提交 2 个...

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

7. 2.0使用addComponent的组件,怎么删除?没有removeComponent [ 78%]

...scale TS项目使用matter.js库无智能提示 使用3D时候,Property 'getComponentByType' does not exist on type 'Node'. 微信小游戏:HTMLDivElement的使用 LayaAirIDE下如何使用mask? 微信小游戏如何使用ttf字体? 请问2.0的版本开始,我用ts编写的相关内容,...

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

8. 2.6.1物理bug [ 75%]

...: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

9. [BUG]刚体约束问题,移动后约束混乱! [ 75%]

...here(new Laya.Vector3(0, 3, 0),1);     let boxARigid = this.boxA.getComponent(Laya.Rigidbody3D);      let boxB = this.addRigidBodyBox(new Laya.Vector3(0, 1, 0),1);     let boxBRigid = boxB.getComponent(Laya.Rigidbody3D);          let configurableConstraint = th...

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

10. 2.6物理问题 [ 75%]

...: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