fix "corner case" in collision detection
This commit is contained in:
parent
247b44db85
commit
84ce0c07bb
1 changed files with 1 additions and 0 deletions
|
@ -845,6 +845,7 @@ checkBoundsCollision2
|
||||||
-> V2 Double
|
-> V2 Double
|
||||||
checkBoundsCollision2
|
checkBoundsCollision2
|
||||||
pre@(V2 pr pc) nex dt acc (Boundaries (minr, minc) (maxr, maxc))
|
pre@(V2 pr pc) nex dt acc (Boundaries (minr, minc) (maxr, maxc))
|
||||||
|
| colltr < dt && colltc < dt = V2 0 0
|
||||||
| colltr < dt || colltc < dt = V2 0 0
|
| colltr < dt || colltc < dt = V2 0 0
|
||||||
| otherwise = acc
|
| otherwise = acc
|
||||||
where
|
where
|
||||||
|
|
Loading…
Reference in a new issue