Fix blink bug

This commit is contained in:
2022-10-19 23:17:26 +01:00
parent 4ad19aa19d
commit 21dc670c9f
13 changed files with 353 additions and 312 deletions
+2
View File
@@ -15,6 +15,7 @@ module Dodge.Base.Collide (
collidePoint,
collidePointWallsFilter,
collidePointTestFilter,
collideCircWalls,
overlapSegWalls,
overlapSegCrs,
bounceBall,
@@ -69,6 +70,7 @@ doBounce :: Float -> Point2 -> Point2 -> (Point2, Maybe Wall) -> Maybe (Point2,
{-# INLINE doBounce #-}
doBounce x sp ep (p, mwl) =
mwl <&> \wl ->
--( p +.+ normalizeV (vNormal (uncurry (-.-) (_wlLine wl)))
( p +.+ normalizeV (vNormal (uncurry (-.-) (_wlLine wl)))
, reflVelWallDamp x wl (ep -.- sp)
)