zeroed-some/dougk / adccf1a

Browse files

duck's head should align with movement direction

Authored by espadonne
SHA
adccf1a30ed06bb6836bf9f0f4f32e7623cf061b
Parents
a782e54
Tree
e2c0d48

1 changed file

StatusFile+-
M src/renderers/three/duck.js 2 1
src/renderers/three/duck.jsmodified
@@ -278,7 +278,8 @@ export function createDoug(scene, gradientMap) {
278278
     group.position.y = Math.sin(elapsed * 2) * 0.03
279279
 
280280
     // Rotation (face direction of movement)
281
-    group.rotation.y = state.rotation
281
+    // Duck model faces +X locally, so offset by -PI/2 to align with movement
282
+    group.rotation.y = state.rotation - Math.PI / 2
282283
 
283284
     // Body wobble while swimming
284285
     const wobbleAmount = Math.sin(state.wobble) * 0.08