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

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

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

...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_示例 发布时间: 20241117

2. 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_示例 发布时间: 20241117

3. 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_示例 发布时间: 20241117

4. 2D物理-复合碰撞器 [ 49%]

...; box.pivot(box.width / 2, box.height / 2); box.pos(posx, posy); this.Main.box2D.addChild(box); let boxBody: RigidBody = box.addComponent(RigidBody); // boxBody.gravityScale = 0; let box1Shape: BoxCollider = box.addComponent(BoxCollider); let box2Shape: BoxCollider = box.addComponent(BoxCollider); l...

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