Work on chase crit shape

This commit is contained in:
2026-04-01 16:21:19 +01:00
parent 6d1cdcc9f3
commit c1bddbae20
4 changed files with 35 additions and 25 deletions
+9 -2
View File
@@ -57,7 +57,6 @@ drawChaseCrit cr = mconcat
]
where
cskin = crShape $ _crType cr
crsize = 0.1 * crRad (cr ^. crType)
rotmdir = rotateSH (_crMvDir cr - _crDir cr)
chaseUpperBody :: Creature -> Shape
@@ -72,10 +71,18 @@ chaseUpperBody cr = colorSH (_skinUpper cskin)
where
tz = 4
cskin = crShape $ _crType cr
torsoq = (V3 0 0 (10 + tz),Q.qid)
torsoq = (V3 0 0 (10 + tz + tbob),Q.qid)
mcool = 1 - min 10 (fromIntegral . _meleeCooldown $ _crType cr) / 10
neckq = torsoq `Q.comp` (V3 6 0 0,Q.axisAngle (V3 0 1 0) (-1.8*mcool))
headq = neckq `Q.comp` (V3 16 0 0, Q.axisAngle (V3 0 1 0) (2*mcool))
sLen = _strideLength $ _crStance cr
tbob = 5 * (1 - oneSmooth (abs llegpos))
llegpos = case cr ^? crStance . carriage of
Just (Walking sa LeftForward) -> f sa
Just (Walking sa RightForward) -> -f sa
_ -> 0
--tbob = 2 * oneSmooth ((sLen - 2*i) / sLen)
f i = ((sLen - 2*i) / sLen)
oneSmooth :: Float -> Float
+1 -1
View File
@@ -437,7 +437,7 @@ loadAmmoTut = do
=<< shuffleLinks
=<< roomRectAutoLights 100 100
droom <- distributerRoom BulletAmmo (10 ^ (8::Int))
croom <- roomCCrits 2
croom <- roomCCrits 1
return $
tToBTree "loadAmmoTest" $
treePost
+3 -1
View File
@@ -1,6 +1,7 @@
{-# OPTIONS_GHC -Wno-unused-imports #-}
module Dodge.TestString where
import Dodge.Creature.Picture
import Dodge.WallCreatureCollisions
import Data.List ((\\))
import ShortShow
@@ -34,7 +35,8 @@ import Data.Monoid
import RandomHelp
testStringInit :: Universe -> [String]
testStringInit u = fmap show $ u ^.. uvWorld . cWorld . lWorld . creatures . ix 0 . crWallTouch . each
testStringInit u = -- fmap show (u ^.. uvWorld . cWorld . lWorld . creatures . ix 0 . crWallTouch . each)
(fmap show $ u ^.. uvWorld . cWorld . lWorld . creatures . each . crStance . carriage)
-- (fmap show $ u ^.. uvWorld . cWorld . lWorld . creatures . each . crStance . carriage . strideAmount)
-- a <> fromMaybe [] (do
-- a w1 <- u ^? uvWorld . cWorld . lWorld . walls . ix 18