Improve weapon handle offsets
This commit is contained in:
@@ -14,13 +14,13 @@ turretItemOffset it tu mc =
|
||||
|
||||
transToHandle :: Item -> Point3 -> Point3
|
||||
transToHandle itm = fromMaybe id $ do
|
||||
x <- itm ^? itUse . heldAim . aimHandlePos
|
||||
return (-.-.- V3 x 0 0)
|
||||
V2 x y <- itm ^? itUse . heldAim . aimHandlePos
|
||||
return (-.-.- V3 x y 0)
|
||||
|
||||
heldItemOffset :: Item -> Creature -> Point3 -> Point3
|
||||
heldItemOffset itm cr
|
||||
| isSelected && _posture (_crStance cr) == Aiming =
|
||||
(+.+.+ V3 (aimingWeaponZeroPos cr itm) 0 shoulderHeight)
|
||||
(+.+.+ aimingWeaponZeroPos cr itm `v2z` shoulderHeight)
|
||||
| isSelected && isTwoHandFlat =
|
||||
(+.+.+ V3 (_crRad cr) 0 handD)
|
||||
. rotate3 (twoFlatHRot cr)
|
||||
|
||||
Reference in New Issue
Block a user