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

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

1. 2D物理-复合碰撞器 [ 100%]

...t(Laya.RigidBody); let box1Shape = box.addComponent(Laya.BoxCollider); let box2Shape = box.addComponent(Laya.BoxCollider); let box3Shape = box.addComponent(Laya.BoxCollider); let box4Shape = box.addComponent(Laya.BoxCollider); box1Shape.width = width + height * 2; box1Shape.height = height; box1Shap...

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

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

...is.createSensor(); } createSensor() { let ground = new Sprite(); this.Main.box2D.addChild(ground); let groundBody: RigidBody = new RigidBody(); groundBody.type = "static"; ground.addComponentIntance(groundBody); let chainCollider: ChainCollider = ground.addComponent(ChainCollider); chainCollider.poi...

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

3. 2D物理-仿生机器人 [ 75%]

...Joint2.joint.GetLength() * Laya.Physics.PIXEL_RATIO; let localAnchor = new box2d.b2Vec2(); wheelBody.getBody().GetLocalPoint({ x: (this.pos[0] + this.m_offset[0]) / Laya.Physics.PIXEL_RATIO, y: (this.pos[1] + this.m_offset[1]) / Laya.Physics.PIXEL_RATIO }, localAnchor); let anchor = [-localAnchor.x ...

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

4. 2D物理-桥 [ 68%]

...nst startPosX = 250, startPosY = 450; let ground = new Sprite(); this.Main.box2D.addChild(ground); let groundBody: RigidBody = new RigidBody(); groundBody.type = "static"; ground.addComponentIntance(groundBody); let chainCollider: ChainCollider = ground.addComponent(ChainCollider); chainCollider.poi...

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