Make weapon position relative to hand positions, wonky for now
This commit is contained in:
@@ -34,20 +34,37 @@ handleOrient loc = case loc ^. locDT . dtValue . _1 . itType of
|
||||
HELD FLAMETHROWER -> (V3 (-1) 0 0, Q.qID)
|
||||
_ -> (V3 (-3) 0 0, Q.qID)
|
||||
|
||||
-- note this is relative to the creature
|
||||
-- the aimstance here should match any aimstance in Aiming
|
||||
---- note this is relative to the creature
|
||||
---- the aimstance here should match any aimstance in Aiming
|
||||
--handOrient :: Creature -> AimStance -> Point3Q
|
||||
--handOrient cr = case cr ^. crStance . posture of
|
||||
-- Aiming {} -> \case
|
||||
-- TwoHandUnder -> (V3 (-3) 0 shoulderHeight, Q.qID)
|
||||
-- TwoHandOver -> (V3 0 0 shoulderHeight, Q.qID)
|
||||
-- OneHand -> (V3 13 (-2) shoulderHeight, Q.qID)
|
||||
-- TwoHandFlat -> (V3 13 0 shoulderHeight, Q.qID)
|
||||
-- AtEase -> \case
|
||||
-- OneHand -> rightHandPQ cr
|
||||
-- TwoHandFlat -> (V3 10 0 15, Q.axisAngle (V3 0 0 1) $ twoFlatHRot cr)
|
||||
-- TwoHandUnder -> (V3 7 (-8) 15, Q.axisAngle (V3 0 0 1) (strideRot cr + 1.2))
|
||||
-- TwoHandOver -> (V3 10 0 15, Q.axisAngle (V3 0 0 1) (strideRot cr + 1.2))
|
||||
|
||||
handOrient :: Creature -> AimStance -> Point3Q
|
||||
handOrient cr = case cr ^. crStance . posture of
|
||||
Aiming {} -> \case
|
||||
TwoHandUnder -> (V3 (-3) 0 shoulderHeight, Q.qID)
|
||||
TwoHandOver -> (V3 0 0 shoulderHeight, Q.qID)
|
||||
OneHand -> (V3 13 (-2) shoulderHeight, Q.qID)
|
||||
TwoHandFlat -> (V3 13 0 shoulderHeight, Q.qID)
|
||||
AtEase -> \case
|
||||
OneHand -> rightHandPQ cr
|
||||
TwoHandFlat -> (V3 10 0 15, Q.axisAngle (V3 0 0 1) $ twoFlatHRot cr)
|
||||
TwoHandUnder -> (V3 7 (-8) 15, Q.axisAngle (V3 0 0 1) (strideRot cr + 1.2))
|
||||
TwoHandOver -> (V3 10 0 15, Q.axisAngle (V3 0 0 1) (strideRot cr + 1.2))
|
||||
handOrient cr = \case
|
||||
TwoHandUnder ->
|
||||
let (rp,_) = rightHandPQ cr
|
||||
(lp,_) = leftHandPQ cr
|
||||
in (rp,Q.qz (argV $ (lp - rp) ^. _xy))
|
||||
TwoHandOver ->
|
||||
let (rp,_) = rightHandPQ cr
|
||||
(lp,_) = leftHandPQ cr
|
||||
in (rp,Q.qz (argV $ (lp - rp) ^. _xy))
|
||||
OneHand -> rightHandPQ cr
|
||||
TwoHandFlat ->
|
||||
let (rp,_) = rightHandPQ cr
|
||||
(lp,_) = leftHandPQ cr
|
||||
in (0.5 *^ (rp + lp),Q.qz (argV (vNormal ((lp - rp) ^. _xy))))
|
||||
|
||||
|
||||
locOrient :: LocationDT OItem -> Creature -> Point3Q
|
||||
locOrient loc cr =
|
||||
|
||||
Reference in New Issue
Block a user