Stop bullets when they hit walls
This commit is contained in:
+1
-1
@@ -82,7 +82,7 @@ wallNormal wl = normalizeV . vNormal $ a -.- b
|
||||
wallsOnLine :: Point2 -> Point2 -> IM.IntMap Wall -> [Wall]
|
||||
wallsOnLine p1 p2 ws = hitWalls
|
||||
where
|
||||
hitPoint w = uncurry (intersectSegSeg p1 p2) (_wlLine w)
|
||||
hitPoint = uncurry (intersectSegSeg p1 p2) . _wlLine
|
||||
hitWalls = filter (isJust . hitPoint) (IM.elems ws)
|
||||
|
||||
wallsOnLine3D :: Point3 -> Point3 -> IM.IntMap Wall -> [Wall]
|
||||
|
||||
Reference in New Issue
Block a user