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

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

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

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

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

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

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

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

6. 裁切图片后,该用什么方式去重绘出裁切后的图片 [ 80%]

...位置点数据): draw() {         const pp = this.owner.getComponent(Laya.PolygonCollider).points;         let points = this.pointS_to_pointA(pp)         let owner: Laya.Sprite = this.owner as Laya.Sprite         const ctx = owner.graphics;    ...

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

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

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

8. [LayaAir3]平面阴影Stencil用法问题 [ 76%]

...        console.log(this.owner.name)         var skin = this.owner.getComponent(Laya.SkinnedMeshRenderer);         let mat = skin.material;         mat.stencilTest = Laya.RenderState.STENCILTEST_NOTEQUAL;         mat.stencilWrite = true;         mat.stencilRef = 2;       ...

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

9. box2d动态创建绑定多个关节报错 Node:the component is singleton,can't add the second one. [ 73%]

...long to other node.";         if (comp.isSingleton && this.getComponent((comp).constructor))             throw "Node:the component is singleton,can't add the second one.";         this._addComponentInstance(comp);         return comp;     }   暂时...

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

10. bug,ChainCollider.points第二次设置,会报错! [ 73%]

...0,0,100,0)确实不会报错,但如果是已存在,比如先设置sp.getComponent(ChainCollider).points = "25,25,50,50";运行后,再改变值时(如果一次运行中连续赋值2次,是不会报错的,必须执行再赋值),就会报错。 如下使用2d示例项目中代码,改写...

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