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

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

31. 物理系统之FixedConstraint(JavaScript-3D基础(JS)-LayaAir3D之物理系统) [ 58%]

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

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

32. 物理系统之FixedConstraint(TypeScript-3D基础(TS)-LayaAir3D之物理系统) [ 58%]

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

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

33. rigidBody.applyForce 物体不会移动 [ 58%]

...is.character = littleGirl; //獲取動畫組建 this.animator = littleGirl.getComponent(Laya.Animator) as Laya.Animator; this.playIdle(); this.rigidBody = this.character.getComponent(Laya.Rigidbody3D); Laya.timer.frameLoop(1, this, this.onKeyDown); //獲取照相機 var camera: Laya.Camera = littleG...

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

34. 物理系统之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

35. Spine渲染器 · LayaAir3.3 · 引擎文档 · LAYABOX [ 56%]

...): void { //拿到IDE节点上挂载的spine组件 this.spine = this.owner.getComponent(Laya.Spine2DRenderNode); let currentSkin: string = this.spine.skinName; // 记录当前皮肤状态 //播放停止后执行逻辑 this.owner.on(Laya.Event.STOPPED, this, () => { // 通过三元运算符切换...

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

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

37. 3D物理系统 · LayaAir3.3 · 引擎文档 · LAYABOX [ 54%]

...略若干代码 */ //获取物理刚体组件 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_文档 发布时间: 20251010

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

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

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

39. 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_文档 发布时间: 20251010

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

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

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