What problem does it solve?
Building stable stacked structures in Unity's 2D physics engine is difficult: stacks collapse from misaligned centers of mass, insufficient friction, too few solver iterations, or sharp-cornered shapes. This Skill provides expert guidance and working C# examples for creating stable stacks, arches, card houses, pyramids, and domino chain reactions with the PhysicsCore2D (Unity.U2D.Physics) API.
Core Features & Use Cases
- Stacking Stability Tuning: Guidance on friction, restitution, solver iterations, center of mass, and shape geometry (e.g., rounded box corners) to prevent collapse.
- Structural Formations: Patterns for arches with keystones, towers, bridges, and precarious card houses, with ready-to-run example scripts.
- Domino Chain Reactions: Setup for spacing, triggering via ApplyLinearImpulse, and multi-shelf alternating chains.
- Use Case: A gameplay programmer building a destruction game can use the Pyramid.cs example (1830 dynamic boxes with slight corner radius) as a stress-tested template for large stable stacks, then tune friction and solver settings per the stability guidelines.
Quick Start
Ask the AI to create a stable pyramid stack of dynamic boxes in Unity PhysicsCore2D using rounded-corner box shapes and an enclosing chamber.