diff --git a/src/components/game/VillageView.tsx b/src/components/game/VillageView.tsx index 940b387..aed35d3 100644 --- a/src/components/game/VillageView.tsx +++ b/src/components/game/VillageView.tsx @@ -411,19 +411,17 @@ export default function VillageView() { y: anim.y, draw: () => { shadow(anim.x, anim.y + 2, 11); - const frameName = working - ? "work" - : moving - ? Math.floor(now / 180) % 2 === 0 - ? "walk1" - : "walk2" - : "idle"; + // 걷기는 프레임 교대 대신 한 프레임 + 총총 바운스 + 미세 기울임 + // (두 걷기 프레임의 몸통 각도가 달라 교대 시 도리도리처럼 보이는 문제 회피) + const frameName = working ? "work" : moving ? "walk1" : "idle"; const sprite = catFramesRef.current.get(frameName); if (sprite) { const sh = 42; const sw = (sprite.width / sprite.height) * sh; + const tilt = moving ? Math.sin(now / 150) * 0.06 : 0; ctx.save(); ctx.translate(anim.x, anim.y + bob); + ctx.rotate(tilt); if (anim.flip) ctx.scale(-1, 1); ctx.drawImage(sprite, -sw / 2, -sh + 4, sw, sh); ctx.restore();