← All decisions

Circle-circle collision assumes equal mass regardless of radius; no per-entity mass field yet

collisionpesimplification

Context

Implementing circle-circle collision resolution (physics roadmap step 4) needed an impulse-resolution formula. The general textbook formula includes per-body mass and rotational terms (moment of inertia, angular velocity) that this engine doesn't model at all.

Options considered

Full formula with per-entity mass and rotation — rejected
Nothing in the engine models mass or angular velocity yet -- would be speculative complexity with no current consumer.
Equal-mass, non-rotating simplification (mass terms dropped from the standard formula) — chosen
Smallest correct step for what actually exists today. A textbook-verifiable sanity check (equal-mass head-on collision must exactly swap velocities) confirms the simplified formula is implemented correctly, not just plausible-looking.

Decision

collision.resolve treats all entities as equal mass; positional separation is split evenly (50/50) between the two entities regardless of radius.

Verification

Unit test asserts the exact textbook fact -- two equal circles meeting head-on with equal and opposite velocity must exactly exchange velocities -- which would fail immediately if the impulse sign or magnitude were wrong.

Consequences

Larger entities don't feel heavier in collisions yet. Adding a mass: Float field to Entity and threading it through collision.resolve is a natural, bounded follow-up once the game design actually calls for it.

References