Skip to content

1.适配DirectorEvent.RESET后调用physicscontactmanager.clear.#99

Merged
star-e merged 3 commits intococos:v4.0.0from
tangkaikk:cleatb2contactMap
Mar 18, 2026
Merged

1.适配DirectorEvent.RESET后调用physicscontactmanager.clear.#99
star-e merged 3 commits intococos:v4.0.0from
tangkaikk:cleatb2contactMap

Conversation

@tangkaikk
Copy link
Copy Markdown
Contributor

1.适配DirectorEvent.RESET后调用physicscontactmanager.clear. 2.根据1来调整,box2d, box2d-jsb, box2d-wam

Re: #

Changelog


Continuous Integration

This pull request:

  • needs automatic test cases check.

    Manual trigger with @cocos-robot run test cases afterward.

  • does not change any runtime related code or build configuration

    If any reviewer thinks the CI checks are needed, please uncheck this option, then close and reopen the issue.


Compatibility Check

This pull request:

  • changes public API, and have ensured backward compatibility with deprecated features.
  • affects platform compatibility, e.g. system version, browser version, platform sdk version, platform toolchain, language version, hardware compatibility etc.
  • affects file structure of the build package or build configuration which requires user project upgrade.
  • introduces breaking changes, please list all changes, affected features and the scope of violation.

@github-actions
Copy link
Copy Markdown

github-actions bot commented Mar 12, 2026

Code Size Check Report

Wechat (WASM) Before After Diff
2D Empty (legacy pipeline) 1010366 bytes 1010366 bytes ✅ 0 bytes
2D All (legacy pipeline) 2676847 bytes 2677360 bytes ⚠️ +513 bytes
2D All (new pipeline) 2768585 bytes 2769101 bytes ⚠️ +516 bytes
(2D + 3D) All 10025771 bytes 10026334 bytes ⚠️ +563 bytes
Web (WASM + ASMJS) Before After Diff
(2D + 3D) All 16845422 bytes 16845985 bytes ⚠️ +563 bytes

Interface Check Report

! WARNING this pull request has changed these public interfaces:

@@ -47500,8 +47500,9 @@
          * @zh 检测给定点在哪些碰撞体内。
          */
         testAABB(rect: math.Rect): readonly Collider2D[];
         static constructAndRegister(): void;
+        clearContacts(): void;
     }
     /**
      * @en
      * Contact impulses for reporting.
@@ -71437,8 +71438,9 @@
             raycast(p1: math.IVec2Like, p2: math.IVec2Like, type: ERaycast2DType, mask: number): RaycastResult2D[];
             testPoint(p: math.Vec2): readonly Collider2D[];
             testAABB(rect: math.Rect): readonly Collider2D[];
             drawDebug(): void;
+            clearContacts(): void;
         }
         export interface _cocos_physics_2d_framework_physics_selector__IPhysicsSelector {
             /**
              * @en

@star-e star-e merged commit b7ba9f7 into cocos:v4.0.0 Mar 18, 2026
14 checks passed
@github-actions
Copy link
Copy Markdown

@tangkaikk ❗ There was an error during the execution of the tasks. Please check the logs for more details.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants