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

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

31. 物理系统之FixedConstraint(ActionScript-3D基础(AS3)-LayaAir3D之物理系统) [ 57%]

...ipt override public function onStart() { this.fixedConstraint = this.owner.getComponent(FixedConstraint); //设置打破约束的力的阈值 this.fixedConstraint.breakForce = 1000; } override public function onUpdate() { if(this.fixedConstraint) { var mass = this.fixedConstraint.connectedBody.mass;...

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

32. box2d 弹性异常 [ 56%]

...any, self: any, contact: any): void { let rig: Laya.RigidBody = this.owner.getComponent(Laya.RigidBody) as Laya.RigidBody; let velocity = rig.linearVelocity; console.log(velocity) } 你把初始弹射改成一个球,你就会发现,这个球,他的水平速度x 小于一定值后就变成0了...

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

33. 3D物理编辑 · LayaAir3.3 · 引擎文档 · LAYABOX [ 53%]

...略若干代码 */ //获取物理刚体组件 this.rigidbody1 = this.cube1.getComponent(Laya.Rigidbody3D) as Laya.Rigidbody3D; this.rigidbody2 = this.cube2.getComponent(Laya.Rigidbody3D) as Laya.Rigidbody3D; //设置rigidbody1为触发器,取消物理反馈 this.rigidbody1.isTrigger = true; this.rig...

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

34. 动画状态机 · LayaAir3.3 · 引擎文档 · LAYABOX [ 48%]

...,如图3-4所示。 (图3-4) LayaAir 3D引擎的Sprite3D类提供了 getComponent() 方法来获取模型上的组件。带动画的模型在加载创建时引擎默认赋予了Animator(动画状态机)动画组件,因此我们可以这样获取: //获得状态机 this.animator = this....

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

35. 2D寻路 · LayaAir3.3 · 引擎文档 · LAYABOX [ 47%]

...ny[], sprite: Sprite, componentType: typeof Component) { let comp = sprite.getComponent(componentType); if (comp != null) { lists.push(comp); } for (var i = 0; i < sprite.numChildren; i++) { let child = sprite.getChildAt(i) as Sprite; this.findCompents(lists, child, componentType); } } //组件...

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

36. 使用3D摄像机 · LayaAir3.3 · 引擎文档 · LAYABOX [ 44%]

...每帧更新时执行,尽量不要在这里写大循环逻辑或者使用getComponent方法 * 此方法为虚方法,使用时重写覆盖即可 */ onUpdate(): void { if (!this.target || !this.camera) return; this.target.transform.position.vsub(this.curpos, this.delatpos); this.camera.transform.p...

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

37. 插件开发说明 · LayaAir3.3 · 引擎文档 · LAYABOX [ 43%]

...修改组件属性,场景里的对象会自动同步,无需手动 node.getComponent("MeshRenderer").props.enabled = false; 2、调用节点/组件的一个方法,并返回值。例如: //下面是UI进程代码 //获取选中的节点 let node = Editor.scene.getSelection()[0]; //调用MyScri...

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