This commit is contained in:
2025-06-01 10:23:14 +01:00
parent 61e85ffd5c
commit c291c7e3da
3 changed files with 100 additions and 104 deletions
+2 -5
View File
@@ -137,14 +137,11 @@ viewDistanceFromItems _ = 1
rotateCamera :: Configuration -> World -> World
rotateCamera cfig w
| Just ltime <- pkeys ^? ix SDL.ButtonLeft
, Just rtime <- pkeys ^? ix SDL.ButtonRight
, rtime > 0
, ltime > rtime
| MouseGameRotate <- w ^. input . mouseContext
, Just rotation <-
angleBetween (w ^. input . mousePos)
<$> (w ^. input . heldPos . at SDL.ButtonRight) =
w & wCam . camRot -~ rotation
w & wCam . camRot -~ rotation
| _gameplay_rotate_to_wall cfig
, isNothing $ pkeys ^? ix SDL.ButtonRight =
rotateToOverlappingWall w