What problem does it solve?
Working with Unity's PhysicsCore2D API beyond basic circles and boxes requires knowing non-obvious ownership rules, mutation paths, and validation discipline for chains, compound shapes, and runtime geometry edits. This Skill provides expert guidance and runnable C# examples so you avoid pitfalls like invalid polygon hulls, ghost-vertex stitching errors, and unnecessary destroy/recreate churn.
Core Features & Use Cases
- Chain Shapes: Build terrain and boundaries with
PhysicsChain.Create or standalone ChainSegmentGeometry.CreateSegments, including ghost-vertex stitching and in-place segment mutation via chainSegmentGeometry and PhysicsChain.UpdateVertices.
- Compound & Rounded Shapes: Attach multiple shapes to one body, create rounded polygons via Minkowski radius offsets, and approximate ellipses with many-sided polygons.
- Runtime Geometry Modification: Mutate
PolygonGeometry in place with the manual write + Validate() pattern, swap shape geometry via type-specific setters, and split fragmented bodies into geometry islands with unbrokenGeometryIslands.
- Use Case: You are building a destructible-terrain game in Unity 6000.5 and need to fragment a column, keep islands touching the ground static, and turn the rest into dynamic debris bodies.
Quick Start
Ask the assistant to show how to create a chain-shape terrain with PhysicsChain in Unity PhysicsCore2D and how to safely modify a polygon's vertices at runtime.