Work on debugging

This commit is contained in:
2023-04-27 11:35:48 +01:00
parent 35990c53bf
commit 9972e0fdea
17 changed files with 39 additions and 28 deletions
+3 -2
View File
@@ -102,8 +102,9 @@ intersectLinefromScreen cfig w a b =
drawCollisionTest :: World -> Picture
drawCollisionTest w = fromMaybe mempty $ do
a <- w ^. input . clickPos . at ButtonLeft
b <- w ^. input . clickPos . at ButtonRight
-- let f = fmap (screenToWorldPos (w ^. wCam))
a <- w ^. input . clickWorldPos . at ButtonLeft
b <- w ^. input . clickWorldPos . at ButtonRight
return $
setLayer DebugLayer (color orange $ line [a, b])
<> foldMap (drawCross . fst) (crHit a b w)