[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7CMKS0KMYSETV8KMS6F0XB0":3,"skill-same:01M7CMKS0KMYSETV8KMS6F0XB0":86},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":24,"commitSha":25,"skillDirectory":26,"forksCount":27,"repositoryHtmlUrl":28,"repositoryHomepageUrl":6,"ownerHtmlUrl":29,"ownerBlogUrl":30,"ownerDescription":6,"updatedAt":31,"install":32,"resources":45},"01M7CMKS0KMYSETV8KMS6F0XB0","unity-physics-2d",null,"2D physics bugs: OnCollisionEnter2D never fires, tunnelling, self-hit casts, one-way platforms.","tipoLi5890\u002Funity-dev-skills","tipoLi5890","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F177803612?v=4","01M7CMD7DHGZ09CB53CRFHAA34","Li, ching yu","01M7CMD7E70K5RAHWWZVYX9YMG",2,"MIT","https:\u002F\u002Fgithub.com\u002FtipoLi5890\u002Funity-dev-skills\u002Fblob\u002Fmain\u002Fskills\u002Funity-physics-2d\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: unity-physics-2d\ndescription: >-\n  2D physics bugs: OnCollisionEnter2D never fires, tunnelling, self-hit casts, one-way platforms.\n---\n\n# unity-physics-2d — Box2D answers in its own vocabulary\n\n> **A PhysX rule renamed with a 2D suffix is usually wrong.** A kinematic `Rigidbody2D` moves\n> under its velocity, a ray that starts inside a collider hits it, sleep is a timer, there are two\n> collision-detection modes, and Z separates nothing. Almost nothing here throws. Work the\n> ladder; do not translate what the 3D engine would do.\n\n## Symptom → where to look\n\nFirst match wins. **Stop at the first cause you confirm** and write the diagnosis.\n\n| Symptom | Go to |\n|---|---|\n| `OnCollisionEnter2D` \u002F `OnTriggerEnter2D` never fires | §1 |\n| A kinematic sentry walks through walls and reports nothing | §1 — full kinematic contacts |\n| A bullet or a fast runner passes through a wall | §2 |\n| A fast body skips a pickup or a hazard trigger | §2 — triggers are not swept |\n| A ground check reports the caster itself, or a cast misses what is in its path | §3 |\n| A click through the camera finds no 2D collider | §3 — a 3D ray against 2D shapes |\n| `OnTriggerStay2D` \u002F `OnCollisionStay2D` ran, then went quiet | §4 — the body fell asleep |\n| A `Rigidbody2D` jitters; the runner stutters while the camera follows | §4 |\n| The tilemap falls out of the scene on Play, or when a composite collider is added | [`reference\u002Fshapes-platforms-build.md`](reference\u002Fshapes-platforms-build.md) §5 — the composite's body |\n| The runner snags on flat ground, tile edges or seams | [`reference\u002Fshapes-platforms-build.md`](reference\u002Fshapes-platforms-build.md) §5 |\n| A body ends up inside a wall and stays there | [`reference\u002Fshapes-platforms-build.md`](reference\u002Fshapes-platforms-build.md) §5 — outlines are hollow |\n| The one-way platform blocks from below, or grips at the sides | [`reference\u002Fshapes-platforms-build.md`](reference\u002Fshapes-platforms-build.md) §6 |\n| Works in the editor, not in the build | [`reference\u002Fshapes-platforms-build.md`](reference\u002Fshapes-platforms-build.md) §7 |\n| Collisions changed after a respawn or a return to the pool | [`reference\u002Fshapes-platforms-build.md`](reference\u002Fshapes-platforms-build.md) §7 — per-instance ignore pairs |\n| Hurtboxes or hitboxes that follow a bone of a skinned character | [`reference\u002Fbone-colliders.md`](reference\u002Fbone-colliders.md) |\n\n## 0. Before diagnosing\n\nConnect to the Editor rather than reading files — `unity-debug` → `reference\u002Feditor-control.md`.\n\n- **Name the stack.** `Rigidbody2D`, `Collider2D`, `Physics2D` and messages ending in `2D` are\n  this ladder; `Rigidbody` and `Physics` are `unity-physics-3d`; `UnityEngine.LowLevelPhysics2D`\n  (`PhysicsWorld`, `PhysicsBody`) is a third vocabulary. The stacks never see each other, and a\n  message from the wrong one is silent.\n- **Two matrices.** `Project Settings → Physics 2D → Layer Collision Matrix` is not the 3D one.\n- **Read `Physics2D.simulationMode`.** In `SimulationMode2D.Script` nothing moves until code calls\n  `Physics2D.Simulate`; a test that set it and never restored it freezes every later scene.\n- **A query sees the pose of the last step.** After writing a Transform, call\n  `Physics2D.SyncTransforms()` once before querying. `Physics2D.autoSyncTransforms` is deprecated.\n- **Never judge callbacks from `Physics2D.Simulate()` outside play mode**: scripts without\n  `[ExecuteAlways]` receive no messages. Queries do work there, after a sync.\n- **Restore any Project Setting you change**, and answer with what the ladder confirmed — or the\n  most likely cause, labelled unconfirmed, with the one check that would settle it.\n\nBody types, the step and `Physics2D.Simulate`:\n[`reference\u002Fbodies-and-simulation.md`](reference\u002Fbodies-and-simulation.md).\n\n## 1. No callback fires\n\nWork down. First match wins.\n\n1. **One of the pair needs a `Rigidbody2D` that is not `Static`.** A collider with no body is on\n   the hidden static body; static × static never makes a contact.\n2. **`Rigidbody2D.simulated == false` removes the body, its colliders and its joints**: no\n   callbacks, no query hits, and the inspector looks right. So does a disabled collider, an\n   inactive parent, or a layer missing from `Physics2D.simulationLayers`.\n3. **Kinematic × Kinematic and Kinematic × Static make no collision contact** until the kinematic\n   body sets `useFullKinematicContacts = true`. With it the body gets `OnCollisionEnter2D` and\n   contact points and is still not pushed.\n4. **Trigger versus collision.** If either collider `isTrigger`, the pair gets `OnTrigger*2D` and\n   never `OnCollision*2D`.\n5. **The layer pair.** `a.CanContact(b)` answers for the matrix and every layer override at once;\n   `Physics2D.GetIgnoreCollision(a, b)` for a per-instance ignore. Contact with no message is\n   `Collider2D.callbackLayers`.\n6. **The script sits on the collider's GameObject or the `Rigidbody2D`'s**, with the exact\n   signature: `OnCollisionEnter2D(Collision2D)`, `OnTriggerEnter2D(Collider2D)`.\n7. **A child merged into a `CompositeCollider2D` loses its own `isTrigger` and material**; the\n   composite's apply.\n\n| Pair | `OnCollisionEnter2D` (no trigger) | `OnTriggerEnter2D` (a trigger in the pair) |\n|---|---|---|\n| Dynamic × anything | Yes | Yes |\n| Kinematic × Kinematic or Static | Only with `useFullKinematicContacts` | Yes |\n| Static × Static, or no body on either side | Never | Never |\n\nLayer schemes, overrides and the ignore calls:\n[`reference\u002Flayers-and-matrix.md`](reference\u002Flayers-and-matrix.md).\n\n## 2. Tunnelling\n\n| `Rigidbody2D.collisionDetectionMode` | Sweeps against |\n|---|---|\n| `CollisionDetectionMode2D.Discrete` | Nothing — the body is tested where each step lands |\n| `CollisionDetectionMode2D.Continuous` | Every non-trigger collider in its path |\n\nTwo modes, not four. With no speculative mode, a hit reported before two shapes touch is a\ncollider larger than its sprite.\n\n- **Set `Continuous` on the fast body**, not on the wall; reserve it for the runner and for\n  projectiles.\n- **`Continuous` does nothing for a Kinematic body and nothing for triggers.** At 40 units\u002Fs a\n  body covers 0.8 units per 0.02 s step and steps over a thinner pickup trigger.\n- **The fix that always holds is a cast.** Sweep the step's movement with `Physics2D.CircleCast`\n  or `Rigidbody2D.Cast` and stop at the first hit:\n  [`reference\u002Fqueries-2d.md`](reference\u002Fqueries-2d.md).\n\n## 3. A cast or overlap misses, or hits itself\n\n- **A ray that starts inside a collider hits that collider** at `fraction` 0 with the normal\n  pointing back along the ray: `Physics2D.queriesStartInColliders` is `true`. A ground ray from\n  the runner's centre returns the runner. Use `Collider2D.Cast` or `Rigidbody2D.Cast`, which\n  ignore the caster, or mask its layer out. Leave the global alone.\n- **A shape cast that starts overlapping reports it at distance 0**, with a normal that\n  describes no surface; with the global off it skips that collider, as a ray does.\n- **Triggers are hit by default — by the overloads that take a layer mask.**\n  `Physics2D.queriesHitTriggers` is `true`, but an overload taking a `ContactFilter2D` also\n  needs `filter.useTriggers`, which is `false` in `new ContactFilter2D()`: one overload finds\n  the pickup, the other does not.\n- **The Z range.** `minDepth` \u002F `maxDepth` compare the collider's Transform Z. Collisions ignore\n  Z, so a wall at Z 5 stops the runner and a depth-filtered cast misses it.\n- **A camera ray is 3D.** `Physics2D.GetRayIntersection(ray)` takes it; under an orthographic\n  camera `Physics2D.OverlapPoint(camera.ScreenToWorldPoint(p))` is enough.\n- **One-way platforms do not exist for queries.** A ground cast from below a platform hits it;\n  the caller filters by normal and height.\n\nEvery query, the list overloads, the filter fields and the start-inside table:\n[`reference\u002Fqueries-2d.md`](reference\u002Fqueries-2d.md).\n\n## 4. It moved, then it stopped — or it jitters\n\n- **Sleep is a timer.** A body slower than `Physics2D.linearSleepTolerance` (`0.01`) for\n  `Physics2D.timeToSleep` (`0.5` s) sleeps, and `OnCollisionStay2D` \u002F `OnTriggerStay2D` stop. For\n  a zone that must tick while something rests in it, set `sleepMode =\n  RigidbodySleepMode2D.NeverSleep` on the one body, or count `Enter` and `Exit`. `AddForce` wakes\n  a sleeping body: a force that seems swallowed is too small, on a Kinematic body or a frozen axis.\n- **A Kinematic `Rigidbody2D` moves under `linearVelocity`.** Gravity and forces are ignored;\n  velocity is not. A sentry that drifts after its patrol still has one.\n- **`MovePosition` is one step of velocity, a position write is a teleport.** `MovePosition`\n  travels during the next step: a rider is carried, and a Dynamic body stops at a wall as §2\n  allows. `Rigidbody2D.position` and `transform.position` jump, with no velocity for a rider to\n  inherit. Move platforms and sentries as Kinematic bodies, in `FixedUpdate`.\n- **A moving collider with no `Rigidbody2D` is rebuilt on the static body at every move** and\n  carries nothing: the rider is left behind. Give it a Kinematic body.\n- **Jitter is two clocks.** The step runs at `Time.fixedDeltaTime` (`0.02`), the frame does not.\n  Set `interpolation = RigidbodyInterpolation2D.Interpolate` on any body the camera follows and\n  put the camera on one clock — `unity-camera` → `reference\u002Fupdate-order-and-jitter.md`. An\n  Animator or a script writing the body's own Transform each frame fights the step: animate a\n  child that holds the sprite.\n- **`Time.timeScale == 0`** stops the step; queries keep answering.\n\nEach of these in full, with `Rigidbody2D.Slide`:\n[`reference\u002Fbodies-and-simulation.md`](reference\u002Fbodies-and-simulation.md).\n\n## 5–7. Shapes, one-way platforms, editor versus build → `reference\u002Fshapes-platforms-build.md`\n\n§5 composites, hollow outlines and snagging seams; §6 effectors and one-way platforms; §7 what\ndiffers in a build, and per-instance ignore pairs after pooling. Same numbering there.\n\n## The probe\n\n`resources\u002FCollisionDebugger2D.cs` — attach to **both** suspected objects, drag each one's\ncollider into the other's `other` field, read the console, remove it when done.\n\n| Console | Diagnosis |\n|---|---|\n| Neither object logs `[Setup]` | The script is not on the objects you think it is |\n| `[Setup]` reports `collider none`, `enabled False`, `simulated False` or `shapes 0` | §1 step 2, `reference\u002Fshapes-platforms-build.md` §5 |\n| `[Pair]` reports `canContact False` or `ignored True` | §1 step 5 |\n| `[Setup]` from both, `[Pair]` clean, no `[Collision]` \u002F `[Trigger]` | §1 steps 1, 3, 4 |\n| `[3D Collision]` appears | 3D components in a 2D scene |\n\n`resources\u002FEditor\u002FPhysics2DAudit.cs` reads the open scene, changes nothing and prints one JSON\nobject — `Tools\u002FUnity Dev\u002FPhysics 2D\u002FAudit Open Scene`, or `Physics2DAudit.Audit()` from an eval.\nIt lists colliders that move with no body, layers that touch nothing, unmerged composite\nchildren, triggers with no body, tilemap colliders with no composite and colliders with no shapes.\n\n## Scope — what this skill does NOT do\n\nThe player's own movement — ground check design, slopes, jump numbers, top-down and grid\nmotors — is `unity-2d-controller`. Painting tiles and a tile's collider type are\n`unity-tilemap`; level layout and runtime tile data are `unity-2d-level`; cell occupancy and grid\npathfinding are `unity-2d-grid`. Sprite physics outlines are `unity-2d-sprites`; draw order is\n`unity-2d-rendering`. A camera that stutters is `unity-camera`; pixel snapping is\n`unity-2d-pixel-perfect`. Asserting that a recorded run never entered geometry is\n`unity-play-harness`. PhysX — `Rigidbody`, `Physics.Raycast`, `CharacterController` — is\n`unity-physics-3d`. Hit and hurt layers are `unity-combat`; pickup and switch triggers are\n`unity-interaction`.\n","# unity-physics-2d — Box2D answers in its own vocabulary\n\n> **A PhysX rule renamed with a 2D suffix is usually wrong.** A kinematic `Rigidbody2D` moves\n> under its velocity, a ray that starts inside a collider hits it, sleep is a timer, there are two\n> collision-detection modes, and Z separates nothing. Almost nothing here throws. Work the\n> ladder; do not translate what the 3D engine would do.\n\n## Symptom → where to look\n\nFirst match wins. **Stop at the first cause you confirm** and write the diagnosis.\n\n| Symptom | Go to |\n|---|---|\n| `OnCollisionEnter2D` \u002F `OnTriggerEnter2D` never fires | §1 |\n| A kinematic sentry walks through walls and reports nothing | §1 — full kinematic contacts |\n| A bullet or a fast runner passes through a wall | §2 |\n| A fast body skips a pickup or a hazard trigger | §2 — triggers are not swept |\n| A ground check reports the caster itself, or a cast misses what is in its path | §3 |\n| A click through the camera finds no 2D collider | §3 — a 3D ray against 2D shapes |\n| `OnTriggerStay2D` \u002F `OnCollisionStay2D` ran, then went quiet | §4 — the body fell asleep |\n| A `Rigidbody2D` jitters; the runner stutters while the camera follows | §4 |\n| The tilemap falls out of the scene on Play, or when a composite collider is added | [`reference\u002Fshapes-platforms-build.md`](reference\u002Fshapes-platforms-build.md) §5 — the composite's body |\n| The runner snags on flat ground, tile edges or seams | [`reference\u002Fshapes-platforms-build.md`](reference\u002Fshapes-platforms-build.md) §5 |\n| A body ends up inside a wall and stays there | [`reference\u002Fshapes-platforms-build.md`](reference\u002Fshapes-platforms-build.md) §5 — outlines are hollow |\n| The one-way platform blocks from below, or grips at the sides | [`reference\u002Fshapes-platforms-build.md`](reference\u002Fshapes-platforms-build.md) §6 |\n| Works in the editor, not in the build | [`reference\u002Fshapes-platforms-build.md`](reference\u002Fshapes-platforms-build.md) §7 |\n| Collisions changed after a respawn or a return to the pool | [`reference\u002Fshapes-platforms-build.md`](reference\u002Fshapes-platforms-build.md) §7 — per-instance ignore pairs |\n| Hurtboxes or hitboxes that follow a bone of a skinned character | [`reference\u002Fbone-colliders.md`](reference\u002Fbone-colliders.md) |\n\n## 0. Before diagnosing\n\nConnect to the Editor rather than reading files — `unity-debug` → `reference\u002Feditor-control.md`.\n\n- **Name the stack.** `Rigidbody2D`, `Collider2D`, `Physics2D` and messages ending in `2D` are\n  this ladder; `Rigidbody` and `Physics` are `unity-physics-3d`; `UnityEngine.LowLevelPhysics2D`\n  (`PhysicsWorld`, `PhysicsBody`) is a third vocabulary. The stacks never see each other, and a\n  message from the wrong one is silent.\n- **Two matrices.** `Project Settings → Physics 2D → Layer Collision Matrix` is not the 3D one.\n- **Read `Physics2D.simulationMode`.** In `SimulationMode2D.Script` nothing moves until code calls\n  `Physics2D.Simulate`; a test that set it and never restored it freezes every later scene.\n- **A query sees the pose of the last step.** After writing a Transform, call\n  `Physics2D.SyncTransforms()` once before querying. `Physics2D.autoSyncTransforms` is deprecated.\n- **Never judge callbacks from `Physics2D.Simulate()` outside play mode**: scripts without\n  `[ExecuteAlways]` receive no messages. Queries do work there, after a sync.\n- **Restore any Project Setting you change**, and answer with what the ladder confirmed — or the\n  most likely cause, labelled unconfirmed, with the one check that would settle it.\n\nBody types, the step and `Physics2D.Simulate`:\n[`reference\u002Fbodies-and-simulation.md`](reference\u002Fbodies-and-simulation.md).\n\n## 1. No callback fires\n\nWork down. First match wins.\n\n1. **One of the pair needs a `Rigidbody2D` that is not `Static`.** A collider with no body is on\n   the hidden static body; static × static never makes a contact.\n2. **`Rigidbody2D.simulated == false` removes the body, its colliders and its joints**: no\n   callbacks, no query hits, and the inspector looks right. So does a disabled collider, an\n   inactive parent, or a layer missing from `Physics2D.simulationLayers`.\n3. **Kinematic × Kinematic and Kinematic × Static make no collision contact** until the kinematic\n   body sets `useFullKinematicContacts = true`. With it the body gets `OnCollisionEnter2D` and\n   contact points and is still not pushed.\n4. **Trigger versus collision.** If either collider `isTrigger`, the pair gets `OnTrigger*2D` and\n   never `OnCollision*2D`.\n5. **The layer pair.** `a.CanContact(b)` answers for the matrix and every layer override at once;\n   `Physics2D.GetIgnoreCollision(a, b)` for a per-instance ignore. Contact with no message is\n   `Collider2D.callbackLayers`.\n6. **The script sits on the collider's GameObject or the `Rigidbody2D`'s**, with the exact\n   signature: `OnCollisionEnter2D(Collision2D)`, `OnTriggerEnter2D(Collider2D)`.\n7. **A child merged into a `CompositeCollider2D` loses its own `isTrigger` and material**; the\n   composite's apply.\n\n| Pair | `OnCollisionEnter2D` (no trigger) | `OnTriggerEnter2D` (a trigger in the pair) |\n|---|---|---|\n| Dynamic × anything | Yes | Yes |\n| Kinematic × Kinematic or Static | Only with `useFullKinematicContacts` | Yes |\n| Static × Static, or no body on either side | Never | Never |\n\nLayer schemes, overrides and the ignore calls:\n[`reference\u002Flayers-and-matrix.md`](reference\u002Flayers-and-matrix.md).\n\n## 2. Tunnelling\n\n| `Rigidbody2D.collisionDetectionMode` | Sweeps against |\n|---|---|\n| `CollisionDetectionMode2D.Discrete` | Nothing — the body is tested where each step lands |\n| `CollisionDetectionMode2D.Continuous` | Every non-trigger collider in its path |\n\nTwo modes, not four. With no speculative mode, a hit reported before two shapes touch is a\ncollider larger than its sprite.\n\n- **Set `Continuous` on the fast body**, not on the wall; reserve it for the runner and for\n  projectiles.\n- **`Continuous` does nothing for a Kinematic body and nothing for triggers.** At 40 units\u002Fs a\n  body covers 0.8 units per 0.02 s step and steps over a thinner pickup trigger.\n- **The fix that always holds is a cast.** Sweep the step's movement with `Physics2D.CircleCast`\n  or `Rigidbody2D.Cast` and stop at the first hit:\n  [`reference\u002Fqueries-2d.md`](reference\u002Fqueries-2d.md).\n\n## 3. A cast or overlap misses, or hits itself\n\n- **A ray that starts inside a collider hits that collider** at `fraction` 0 with the normal\n  pointing back along the ray: `Physics2D.queriesStartInColliders` is `true`. A ground ray from\n  the runner's centre returns the runner. Use `Collider2D.Cast` or `Rigidbody2D.Cast`, which\n  ignore the caster, or mask its layer out. Leave the global alone.\n- **A shape cast that starts overlapping reports it at distance 0**, with a normal that\n  describes no surface; with the global off it skips that collider, as a ray does.\n- **Triggers are hit by default — by the overloads that take a layer mask.**\n  `Physics2D.queriesHitTriggers` is `true`, but an overload taking a `ContactFilter2D` also\n  needs `filter.useTriggers`, which is `false` in `new ContactFilter2D()`: one overload finds\n  the pickup, the other does not.\n- **The Z range.** `minDepth` \u002F `maxDepth` compare the collider's Transform Z. Collisions ignore\n  Z, so a wall at Z 5 stops the runner and a depth-filtered cast misses it.\n- **A camera ray is 3D.** `Physics2D.GetRayIntersection(ray)` takes it; under an orthographic\n  camera `Physics2D.OverlapPoint(camera.ScreenToWorldPoint(p))` is enough.\n- **One-way platforms do not exist for queries.** A ground cast from below a platform hits it;\n  the caller filters by normal and height.\n\nEvery query, the list overloads, the filter fields and the start-inside table:\n[`reference\u002Fqueries-2d.md`](reference\u002Fqueries-2d.md).\n\n## 4. It moved, then it stopped — or it jitters\n\n- **Sleep is a timer.** A body slower than `Physics2D.linearSleepTolerance` (`0.01`) for\n  `Physics2D.timeToSleep` (`0.5` s) sleeps, and `OnCollisionStay2D` \u002F `OnTriggerStay2D` stop. For\n  a zone that must tick while something rests in it, set `sleepMode =\n  RigidbodySleepMode2D.NeverSleep` on the one body, or count `Enter` and `Exit`. `AddForce` wakes\n  a sleeping body: a force that seems swallowed is too small, on a Kinematic body or a frozen axis.\n- **A Kinematic `Rigidbody2D` moves under `linearVelocity`.** Gravity and forces are ignored;\n  velocity is not. A sentry that drifts after its patrol still has one.\n- **`MovePosition` is one step of velocity, a position write is a teleport.** `MovePosition`\n  travels during the next step: a rider is carried, and a Dynamic body stops at a wall as §2\n  allows. `Rigidbody2D.position` and `transform.position` jump, with no velocity for a rider to\n  inherit. Move platforms and sentries as Kinematic bodies, in `FixedUpdate`.\n- **A moving collider with no `Rigidbody2D` is rebuilt on the static body at every move** and\n  carries nothing: the rider is left behind. Give it a Kinematic body.\n- **Jitter is two clocks.** The step runs at `Time.fixedDeltaTime` (`0.02`), the frame does not.\n  Set `interpolation = RigidbodyInterpolation2D.Interpolate` on any body the camera follows and\n  put the camera on one clock — `unity-camera` → `reference\u002Fupdate-order-and-jitter.md`. An\n  Animator or a script writing the body's own Transform each frame fights the step: animate a\n  child that holds the sprite.\n- **`Time.timeScale == 0`** stops the step; queries keep answering.\n\nEach of these in full, with `Rigidbody2D.Slide`:\n[`reference\u002Fbodies-and-simulation.md`](reference\u002Fbodies-and-simulation.md).\n\n## 5–7. Shapes, one-way platforms, editor versus build → `reference\u002Fshapes-platforms-build.md`\n\n§5 composites, hollow outlines and snagging seams; §6 effectors and one-way platforms; §7 what\ndiffers in a build, and per-instance ignore pairs after pooling. Same numbering there.\n\n## The probe\n\n`resources\u002FCollisionDebugger2D.cs` — attach to **both** suspected objects, drag each one's\ncollider into the other's `other` field, read the console, remove it when done.\n\n| Console | Diagnosis |\n|---|---|\n| Neither object logs `[Setup]` | The script is not on the objects you think it is |\n| `[Setup]` reports `collider none`, `enabled False`, `simulated False` or `shapes 0` | §1 step 2, `reference\u002Fshapes-platforms-build.md` §5 |\n| `[Pair]` reports `canContact False` or `ignored True` | §1 step 5 |\n| `[Setup]` from both, `[Pair]` clean, no `[Collision]` \u002F `[Trigger]` | §1 steps 1, 3, 4 |\n| `[3D Collision]` appears | 3D components in a 2D scene |\n\n`resources\u002FEditor\u002FPhysics2DAudit.cs` reads the open scene, changes nothing and prints one JSON\nobject — `Tools\u002FUnity Dev\u002FPhysics 2D\u002FAudit Open Scene`, or `Physics2DAudit.Audit()` from an eval.\nIt lists colliders that move with no body, layers that touch nothing, unmerged composite\nchildren, triggers with no body, tilemap colliders with no composite and colliders with no shapes.\n\n## Scope — what this skill does NOT do\n\nThe player's own movement — ground check design, slopes, jump numbers, top-down and grid\nmotors — is `unity-2d-controller`. Painting tiles and a tile's collider type are\n`unity-tilemap`; level layout and runtime tile data are `unity-2d-level`; cell occupancy and grid\npathfinding are `unity-2d-grid`. Sprite physics outlines are `unity-2d-sprites`; draw order is\n`unity-2d-rendering`. A camera that stutters is `unity-camera`; pixel snapping is\n`unity-2d-pixel-perfect`. Asserting that a recorded run never entered geometry is\n`unity-play-harness`. PhysX — `Rigidbody`, `Physics.Raycast`, `CharacterController` — is\n`unity-physics-3d`. Hit and hurt layers are `unity-combat`; pickup and switch triggers are\n`unity-interaction`.\n",{"name":5,"description":7},"main","b7459aa49fb881c5abb764223674ec8f397a02b1","skills\u002Funity-physics-2d",0,"https:\u002F\u002Fgithub.com\u002FtipoLi5890\u002Funity-dev-skills","https:\u002F\u002Fgithub.com\u002FtipoLi5890","https:\u002F\u002Ftipoli5890.github.io\u002F","2026-11-10 09:16:41",{"source":8,"skillName":5,"commands":33,"prompt":43,"zipAvailable":44},[34,37,40],{"tool":35,"command":36},"npx","npx skills add tipoLi5890\u002Funity-dev-skills --skill unity-physics-2d",{"tool":38,"command":39},"bunx","bunx skills add tipoLi5890\u002Funity-dev-skills --skill unity-physics-2d",{"tool":41,"command":42},"pnpm","pnpm dlx skills add tipoLi5890\u002Funity-dev-skills --skill unity-physics-2d","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FtipoLi5890\u002Funity-dev-skills\u002Fblob\u002Fmain\u002Fskills\u002Funity-physics-2d\u002FSKILL.md",true,[46,52,56,60,64,68,72,76,82],{"path":47,"resourceType":48,"resourceTypeDesc":49,"sizeBytes":50,"sourceHtmlUrl":51},"reference\u002Fbodies-and-simulation.md","REFERENCE","参考文档",10301,"https:\u002F\u002Fgithub.com\u002FtipoLi5890\u002Funity-dev-skills\u002Fblob\u002Fmain\u002Fskills\u002Funity-physics-2d\u002Freference\u002Fbodies-and-simulation.md",{"path":53,"resourceType":48,"resourceTypeDesc":49,"sizeBytes":54,"sourceHtmlUrl":55},"reference\u002Fbone-colliders.md",3288,"https:\u002F\u002Fgithub.com\u002FtipoLi5890\u002Funity-dev-skills\u002Fblob\u002Fmain\u002Fskills\u002Funity-physics-2d\u002Freference\u002Fbone-colliders.md",{"path":57,"resourceType":48,"resourceTypeDesc":49,"sizeBytes":58,"sourceHtmlUrl":59},"reference\u002Feffectors-and-joints.md",9378,"https:\u002F\u002Fgithub.com\u002FtipoLi5890\u002Funity-dev-skills\u002Fblob\u002Fmain\u002Fskills\u002Funity-physics-2d\u002Freference\u002Feffectors-and-joints.md",{"path":61,"resourceType":48,"resourceTypeDesc":49,"sizeBytes":62,"sourceHtmlUrl":63},"reference\u002Flayers-and-matrix.md",10198,"https:\u002F\u002Fgithub.com\u002FtipoLi5890\u002Funity-dev-skills\u002Fblob\u002Fmain\u002Fskills\u002Funity-physics-2d\u002Freference\u002Flayers-and-matrix.md",{"path":65,"resourceType":48,"resourceTypeDesc":49,"sizeBytes":66,"sourceHtmlUrl":67},"reference\u002Fqueries-2d.md",11779,"https:\u002F\u002Fgithub.com\u002FtipoLi5890\u002Funity-dev-skills\u002Fblob\u002Fmain\u002Fskills\u002Funity-physics-2d\u002Freference\u002Fqueries-2d.md",{"path":69,"resourceType":48,"resourceTypeDesc":49,"sizeBytes":70,"sourceHtmlUrl":71},"reference\u002Fshapes-platforms-build.md",3748,"https:\u002F\u002Fgithub.com\u002FtipoLi5890\u002Funity-dev-skills\u002Fblob\u002Fmain\u002Fskills\u002Funity-physics-2d\u002Freference\u002Fshapes-platforms-build.md",{"path":73,"resourceType":48,"resourceTypeDesc":49,"sizeBytes":74,"sourceHtmlUrl":75},"reference\u002Ftilemap-colliders.md",9678,"https:\u002F\u002Fgithub.com\u002FtipoLi5890\u002Funity-dev-skills\u002Fblob\u002Fmain\u002Fskills\u002Funity-physics-2d\u002Freference\u002Ftilemap-colliders.md",{"path":77,"resourceType":78,"resourceTypeDesc":79,"sizeBytes":80,"sourceHtmlUrl":81},"resources\u002FCollisionDebugger2D.cs","OTHER","其他",4236,"https:\u002F\u002Fgithub.com\u002FtipoLi5890\u002Funity-dev-skills\u002Fblob\u002Fmain\u002Fskills\u002Funity-physics-2d\u002Fresources\u002FCollisionDebugger2D.cs",{"path":83,"resourceType":78,"resourceTypeDesc":79,"sizeBytes":84,"sourceHtmlUrl":85},"resources\u002FEditor\u002FPhysics2DAudit.cs",10407,"https:\u002F\u002Fgithub.com\u002FtipoLi5890\u002Funity-dev-skills\u002Fblob\u002Fmain\u002Fskills\u002Funity-physics-2d\u002Fresources\u002FEditor\u002FPhysics2DAudit.cs",[87,94,101,108,115,122],{"skillNo":88,"name":89,"nameZh":6,"description":90,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":91,"categories":92,"keywords":93,"publishedAt":19},"01M7CMNYXQNW14ST64EYEEZ5V5","unity-web-release","Ship a WebGL\u002FWebGPU build: shrink the download, Brotli server headers, Safari and iPhone memory.","https:\u002F\u002Fgithub.com\u002FtipoLi5890\u002Funity-dev-skills\u002Fblob\u002Fmain\u002Fskills\u002Funity-web-release\u002FSKILL.md",[],[],{"skillNo":95,"name":96,"nameZh":6,"description":97,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":98,"categories":99,"keywords":100,"publishedAt":19},"01M7CMNTHD1EA70CCJ2F9FN3HT","unity-vivox","Vivox voice and text chat: channels, positional voice, mute and push-to-talk, mic permission.","https:\u002F\u002Fgithub.com\u002FtipoLi5890\u002Funity-dev-skills\u002Fblob\u002Fmain\u002Fskills\u002Funity-vivox\u002FSKILL.md",[],[],{"skillNo":102,"name":103,"nameZh":6,"description":104,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":105,"categories":106,"keywords":107,"publishedAt":19},"01M7CMNPHPRQZ7K1FES2953DRQ","unity-urp-migration","Migrate a Built-in project to URP, or fix a half-moved one: pink materials, PPv2, old shaders.","https:\u002F\u002Fgithub.com\u002FtipoLi5890\u002Funity-dev-skills\u002Fblob\u002Fmain\u002Fskills\u002Funity-urp-migration\u002FSKILL.md",[],[],{"skillNo":109,"name":110,"nameZh":6,"description":111,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":112,"categories":113,"keywords":114,"publishedAt":19},"01M7CMNJ756DK4V0D50HMAZYQW","unity-ui-ugui","Canvas UI (uGUI): CanvasScaler, RectTransform anchors, Layout Groups, ScrollView, UI built from C#.","https:\u002F\u002Fgithub.com\u002FtipoLi5890\u002Funity-dev-skills\u002Fblob\u002Fmain\u002Fskills\u002Funity-ui-ugui\u002FSKILL.md",[],[],{"skillNo":116,"name":117,"nameZh":6,"description":118,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":119,"categories":120,"keywords":121,"publishedAt":19},"01M7CMNDESZN79EK5FRDXCA2WA","unity-ui-toolkit","UI Toolkit (UXML, USS, UIDocument): flex layout, binding, custom elements, editor windows.","https:\u002F\u002Fgithub.com\u002FtipoLi5890\u002Funity-dev-skills\u002Fblob\u002Fmain\u002Fskills\u002Funity-ui-toolkit\u002FSKILL.md",[],[],{"skillNo":123,"name":124,"nameZh":6,"description":125,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":126,"categories":127,"keywords":128,"publishedAt":19},"01M7CMN8GBV07K0YCY07BJ6A1W","unity-ugs","Unity Gaming Services API: which package, init and sign-in order, Cloud Save, Cloud Code, Remote Config.","https:\u002F\u002Fgithub.com\u002FtipoLi5890\u002Funity-dev-skills\u002Fblob\u002Fmain\u002Fskills\u002Funity-ugs\u002FSKILL.md",[],[]]