Work on chase crit shape
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user