Simplify creature stride length

This commit is contained in:
2026-04-01 20:46:48 +01:00
parent 735cc8d92d
commit c2de804fa9
8 changed files with 85 additions and 80 deletions
+2 -2
View File
@@ -78,7 +78,7 @@ chaseUpperBody cr = colorSH (_skinUpper cskin)
vocaltilt = case cr ^? crVocalization . vcTime of
Just x | x < 20 -> -pi * 0.05 * (10 - abs (fromIntegral x - 10))
_ -> 0
sLen = _strideLength $ _crStance cr
sLen = strideLength cr
tbob = 5 * (1 - oneSmooth (abs llegpos))
llegpos = case cr ^? crStance . carriage of
Just (Walking sa LeftForward) -> f sa
@@ -101,7 +101,7 @@ feet cr = case cr ^? crStance . carriage of
sh x = translateSHxy x off aFoot <> translateSHxy (- x) (- off) aFoot
aFoot = upperPrismPolyST 10 $ polyCirc 3 4
off = 5
sLen = _strideLength $ _crStance cr
sLen = strideLength cr
-- f i = 8 * (sLen - 2*i) / sLen
f i = 8 * oneSmooth ((sLen - 2*i) / sLen)