Generalise pathing, usable with flying creatures

This commit is contained in:
2026-04-02 19:30:44 +01:00
parent c2de804fa9
commit ff903bfb3b
19 changed files with 322 additions and 215 deletions
+9
View File
@@ -8,6 +8,7 @@ module Dodge.Creature.Picture (
deadUpperBody,
deadFeet,
drawChaseCrit,
drawHoverCrit,
) where
import Linear
@@ -50,6 +51,14 @@ basicCrShape cr
crsize = 0.1 * crRad (cr ^. crType)
rotmdir = rotateSH (_crMvDir cr - _crDir cr)
drawHoverCrit :: Creature -> Shape
drawHoverCrit cr = colorSH (_skinUpper cskin)
(overPosSH (Q.apply tpq) $ upperBoxHalf Medium Typical 2 $ square 5)
where
cskin = crShape $ _crType cr
z = cr ^?! crStance . carriage . flyHeight
tpq = (V3 0 0 z, Q.qid)
drawChaseCrit :: Creature -> Shape
drawChaseCrit cr = mconcat
[ chaseUpperBody cr