diff --git a/src/config.js b/src/config.js index cecd3cd..dcec53c 100644 --- a/src/config.js +++ b/src/config.js @@ -213,7 +213,16 @@ export const SCORE = { // which fly under a reduced fraction, see KID.ejectedGravityScale), // tumbling as it goes, then lands and stays where it lands. export const SMASH_ITEM = { - radius: 22 * WORLD_SCALE, // circle hitbox (~70% of the 64px frame's display half) + // Circle hitbox. The spritesheet art sits in the LOWER half of each 64x64 + // cell and fills down to the very bottom of that cell, so an item's VISUAL + // bottom edge is exactly displayHalf (= SMASH_ITEM.displaySize / 2 = 64 + // world px) below its centre. In this build a Matter circle's on-screen + // radius is 2x the value passed to shape.radius (32 -> 64 world px, the + // game's own convention), so we pass displaySize/4 to make the PHYSICAL + // bottom coincide with the VISUAL bottom. That is what stops a gravity item + // from hovering above the ground - its art actually reaches the terrain + // (and any other body it falls onto) instead of floating a gap above it. + radius: 16 * WORLD_SCALE, // = SMASH_ITEM.displaySize / 4 (body radius -> 64) displaySize: 64 * WORLD_SCALE, // one 64x64 frame, shown square density: 0.001, friction: 0.5,