Start simplifying creature body parts/attachment positioning

This commit is contained in:
2025-08-09 09:47:05 +01:00
parent 9fb7440776
commit 1063a2314d
10 changed files with 240 additions and 183 deletions
+2 -1
View File
@@ -46,5 +46,6 @@ equipPosition epos cr p sh = case epos of
<> translateToRightLeg cr sh-- (mirrorSPxz sh)
OnHead -> translateToHead cr sh
OnChest -> translateToChest cr sh
OnBack -> translateToBack cr p sh
--OnBack -> translateToBack cr p sh
OnBack -> overPosSP (\x -> fst $ backPQ cr `Q.comp` (p + x,Q.qID)) sh
OnSpecial -> sh
+2 -2
View File
@@ -50,7 +50,7 @@ handOrient cr = case cr ^. crStance . posture of
walkhandp = case cr ^? crStance . carriage of
Just (Walking x LeftForward) -> f x * 50 -2
_ -> - 2
f i = 0.1 * fromIntegral (sLen - i) / fromIntegral sLen
f i = 0.1 * (sLen - i) / sLen
sLen = _strideLength $ _crStance cr
locOrient :: LocationDT OItem -> Creature -> Point3Q
@@ -74,7 +74,7 @@ strideRot cr = case cr ^? crStance . carriage of
Just (Walking x RightForward) -> - f x
_ -> 0
where
f i = 0.1 * fromIntegral (sLen - i) / fromIntegral sLen
f i = 0.1 * (sLen - i) / sLen
sLen = _strideLength $ _crStance cr
twoFlatHRot :: Creature -> Float