Work on refactoring positioning relative to creature body

This commit is contained in:
2025-08-27 12:11:01 +01:00
parent 2e6b7a1b41
commit 9d2a2e6730
8 changed files with 168 additions and 148 deletions
+3 -3
View File
@@ -54,9 +54,9 @@ setWristShieldPos itm cr w = w & moveWallIDUnsafe i wlline
wlline = (f (V3 (-10) 7 0), f (V3 10 7 0))
invid = _ilInvID (_itLocation itm)
handtrans = case cr ^? crInv . ix invid >>= \k -> w ^? cWorld . lWorld . items . ix k . itLocation . ilEquipSite . _Just of
Just OnLeftWrist -> \cr' -> translatePointToLeftHand m cr' . g
_ -> translatePointToRightHand m
Just OnLeftWrist -> \cr' -> translatePointToLeftHand cr' . g
_ -> translatePointToRightHand
g
| twists m cr = (+.+.+ V3 (-5) 10 0)
| twists cr = (+.+.+ V3 (-5) 10 0)
| otherwise = id
f = (+.+ _crPos cr) . stripZ . rotate3 (_crDir cr) . handtrans cr