Fix aiming with scope
This commit is contained in:
@@ -133,13 +133,13 @@ wasdWithAiming w speed cr
|
||||
dir = fmap ((w ^. wCam . camRot) +) (safeArgV movDir)
|
||||
movAbs = rotateV (w ^. wCam . camRot) $ normalizeV movDir
|
||||
isAiming = _posture (_crStance cr) == Aiming
|
||||
mouseDir = fromMaybe
|
||||
(argV (_mousePos (_input w)) + (w ^. wCam . camRot))
|
||||
$ do
|
||||
itRef <- cr ^? crManipulation . manObject . inInventory . ispItem
|
||||
-- _ <- cr ^? crInv . ix itRef . itScope . scopePos
|
||||
_ <- cr ^? crInv . ix itRef . itScope . remotePos
|
||||
return . argV $ mouseWorldPos (w ^. input) (w ^. wCam) -.- _crPos cr
|
||||
mouseDir = argV $ mouseWorldPos (w ^. input) (w ^. wCam) - (cr ^. crPos)
|
||||
-- mouseDir = fromMaybe
|
||||
-- (argV (_mousePos (_input w)) + (w ^. wCam . camRot))
|
||||
-- $ do
|
||||
-- itRef <- cr ^? crManipulation . manObject . inInventory . ispItem
|
||||
-- _ <- cr ^? crInv . ix itRef . itScope . remotePos
|
||||
-- return . argV $ mouseWorldPos (w ^. input) (w ^. wCam) -.- _crPos cr
|
||||
|
||||
aimTurn :: Float -> Creature -> Creature
|
||||
aimTurn a cr = creatureTurnTowardDir a (x * 0.2) cr
|
||||
|
||||
Reference in New Issue
Block a user