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

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

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

...n, F); } } onTriggerExit(colliderB: ColliderBase, colliderA: ColliderBase, contact) { if (colliderA === this.sensorCollider) { let bodyB: RigidBody = colliderB.owner.getComponent(RigidBody); let index = bodyB.getBody().GetUserData().pointer; this.touching[index] = false; } } dispose() { Laya.physics...

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

22. 3D 触发器如何获取碰撞位置 [ 60%]

...r: Laya.MeshSprite3D = this.owner as Laya.MeshSprite3D; let position = obj.contacts[0].positionOnA; // 碰撞位置 }     onTriggerEnter(obj) 、、如何获取碰撞位置? 2020-04-08 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容相关的链...

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

23. 预制体添加刚体后,和其它刚体碰撞后不能修改角度和位置 [ 58%]

...它刚体碰撞后不能修改角度和位置  onTriggerEnter(other,self,contact)     {         var n=this.owner.rotation;         if(other.label === "heng"){             console.log("角度"+this.owner.rotation);             this.owner.rotation=180-n;...

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

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

...able() {             }      onTriggerEnter(other: any, self: any, contact: any): void {     //搜索黏贴在圆环上     } onUpdate(): void {     }  onDisable(): void {     Laya.Pool.recover("friut",this.owner); } } 附件 : --> FruitMaster.zip 2022-04-13 添加评论 免费帖 -...

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

25. Laya2.6.0beta 物理引擎 刚体碰撞点位置获取不正确 [ 56%]

...的官方物理引擎事例, 在DropBox的onTriggerEnter()方法中, 使用contact参数, 分别在小球与方块时, 小球与地板碰撞时, 获取碰撞点坐标位置并添加小黄点标记 : 小球与地板碰撞点的坐标位置正确; 小球与方块碰撞点的坐标位置不对, 一律...

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

26. 解析JSON格式的数据 [ 55%]

...),null,Loader.JSON); function readJsonFinish() { console.log(strJson); var contact = JSON.parse(strJson); } } cuixueying • 2016-07-26 11:13 Laya.loader.load是预加载JSON字符串,并非是获取JSON Laya.loader.getRes是获取预加载过的JSON字符串 guoyiwei • 2016-07-26 14:25 @cuixuey...

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

27. 2d物理引擎onTriggerStay不执行的bug [ 54%]

...riggered"标签已经用被来区分是Enter还是Stay了。 而在box2d.b2Contact.prototype.Update函数中,又用"!b"的方式区分了是Begin还是Stay。 这种重复的区分导致onTriggerStay一直无法被调用。 上图红框出,应该去掉"!",改为"b && c && a...

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

28. 下面这段unity碰撞代码如何用laya2.0物理引擎实现 [ 53%]

...      return;     }     float num = 0f;     foreach (ContactPoint2D contactPoint2D in collision.contacts)     {         num += contactPoint2D.normalImpulse;     }        this.AddResistence(collision, this.inflationUtils.GetEnemyResistance() * 0.5f, ...

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

29. 物理系统之ConfigurableConstraint(JavaScript-3D基础(JS)-LayaAir3D之物理系统) [ 52%]

...距离时将其推回。取值范围[0, 1.0] | | 未实现 | Linear Limit Contact Distance | | | angularLimitSpring | Angular X Y Z Limit Spring | 当物体超过约束的极限角度时,施加弹簧扭矩以使物体向后旋转。 | | angularDamp | Angular X Y Z Limit Damper | 阻尼系数,弹...

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

30. 物理系统之ConfigurableConstraint(TypeScript-3D基础(TS)-LayaAir3D之物理系统) [ 52%]

...距离时将其推回。取值范围[0, 1.0] | | 未实现 | Linear Limit Contact Distance | | | angularLimitSpring | Angular X Y Z Limit Spring | 当物体超过约束的极限角度时,施加弹簧扭矩以使物体向后旋转。 | | angularDamp | Angular X Y Z Limit Damper | 阻尼系数,弹...

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