more fix
This commit is contained in:
parent
38218fa50c
commit
a8beb8fca5
1 changed files with 3 additions and 3 deletions
|
@ -359,9 +359,9 @@ checkBoundsCollision2
|
||||||
-> V2 Double
|
-> V2 Double
|
||||||
checkBoundsCollision2
|
checkBoundsCollision2
|
||||||
pre@(V2 pr pc) next@(V2 nr nc) dt acc (Boundaries (minr, minc) (maxr, maxc))
|
pre@(V2 pr pc) next@(V2 nr nc) dt acc (Boundaries (minr, minc) (maxr, maxc))
|
||||||
| (colltr >= dt || abs colltr > 0.1) && (colltc >= dt || abs colltc > 0.1) = acc
|
| (colltr > dt || colltr < -0.1) && (colltc > dt || colltc < -0.1) = acc
|
||||||
| (colltr >= dt || abs colltr > 0.1) = (V2 1 0) * acc
|
| (colltr > dt || colltr < -0.1) = (V2 1 0) * acc
|
||||||
| (colltc >= dt || abs colltc > 0.1) = (V2 0 1) * acc
|
| (colltc > dt || colltc < -0.1) = (V2 0 1) * acc
|
||||||
| otherwise = V2 0 0
|
| otherwise = V2 0 0
|
||||||
where
|
where
|
||||||
vel@(V2 vr vc) = fmap (/ dt) (next - pre)
|
vel@(V2 vr vc) = fmap (/ dt) (next - pre)
|
||||||
|
|
Loading…
Reference in a new issue