Tweak walk cycle parameters
This commit is contained in:
@@ -24,7 +24,7 @@ yourControl w (f,g) cr =
|
||||
, Just . mouseActionsCr (_mouseButtons w) $ wasdWithAiming w speed 0 cr
|
||||
)
|
||||
where
|
||||
speed = 3
|
||||
speed = 4
|
||||
{- | Turn key presses into creature movement. -}
|
||||
wasdWithAiming
|
||||
:: World
|
||||
@@ -35,12 +35,13 @@ wasdWithAiming
|
||||
wasdWithAiming w speed i cr
|
||||
| isAiming = set crDir mouseDir $ crMvBy (speed *.* mov) cr
|
||||
| isMoving = crMvAbsolute (speed *.* movAbs) $ turnAction cr
|
||||
-- | isMoving = crMvAbsolute (speed *.* movAbs) cr
|
||||
-- | isMoving = crMvForward speed $ over crDir (`fromMaybe` dir) cr
|
||||
| otherwise = cr
|
||||
where
|
||||
(mov',dir') = wasdComp (view keys w) w
|
||||
dir = fmap (_cameraRot w +) dir'
|
||||
turnAction cr' = maybe cr (\d -> creatureTurnTowardDir d 0.2 cr') dir
|
||||
turnAction cr' = maybe cr' (\d -> creatureTurnTowardDir d 0.2 cr') dir
|
||||
movAbs = rotateV (_cameraRot w) mov'
|
||||
mov = rotateV (negate $ _crDir cr - _cameraRot w) mov'
|
||||
isAiming = _posture (_crStance cr) == Aiming
|
||||
|
||||
Reference in New Issue
Block a user