Improve creature stride

This commit is contained in:
2026-03-29 10:46:05 +01:00
parent 08fcc4baab
commit a791c44854
4 changed files with 116 additions and 75 deletions
+2 -1
View File
@@ -374,7 +374,8 @@ updateCreatureStride :: Creature -> Creature
updateCreatureStride cr = cr & crStance . carriage . strideAmount +~ d
where
s = fromMaybe 0 $ crMvType cr ^? mvSpeed
d = min s . norm $ cr ^. crPos - cr ^. crOldPos
-- d = min s . norm $ cr ^. crPos - cr ^. crOldPos
d = max 0 . min s $ dotV (cr ^. crPos . _xy - cr ^. crOldPos . _xy) (unitVectorAtAngle (cr ^. crMvDir))
updateAimPos :: Universe -> Universe
updateAimPos u =