Commit before attempting to allow for non-convex chasm shapes
This commit is contained in:
@@ -95,7 +95,7 @@ extendConeToScreenEdge cfig w c (x, y) = orderPolygon $ wallScreenIntersect ++ [
|
||||
intersectLinefromScreen :: Config -> World -> Point2 -> Point2 -> Maybe Point2
|
||||
intersectLinefromScreen cfig w a b =
|
||||
listToMaybe
|
||||
. mapMaybe (\(x, y) -> intersectSegLineFrom x y b (b +.+ b -.- a))
|
||||
. mapMaybe (\(x, y) -> intersectSegRay x y b (b +.+ b -.- a))
|
||||
. loopPairs
|
||||
$ screenPolygon cfig (w ^. wCam)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user