make it run, not work
This commit is contained in:
parent
75c67a0c5a
commit
51e8de7451
2 changed files with 3 additions and 3 deletions
|
@ -49,7 +49,7 @@ class (Show c, Mass c) => Collidible c where
|
||||||
collisionOccured :: c -> Bool
|
collisionOccured :: c -> Bool
|
||||||
|
|
||||||
-- | Update the collision occurence flag
|
-- | Update the collision occurence flag
|
||||||
updateCollisionOccurence :: c -> (Bool -> c)
|
updateCollisionOccurence :: c -> Bool -> c
|
||||||
|
|
||||||
-- | returns the bottom left and top right corners relative to the objects
|
-- | returns the bottom left and top right corners relative to the objects
|
||||||
-- positional vector of the axis aligned bounding box (AABB) serving here
|
-- positional vector of the axis aligned bounding box (AABB) serving here
|
||||||
|
|
|
@ -58,7 +58,7 @@ update level dt = liftIO $ do
|
||||||
let partners =
|
let partners =
|
||||||
V.foldl
|
V.foldl
|
||||||
(\jacc (qInd, tangible2) ->
|
(\jacc (qInd, tangible2) ->
|
||||||
let res = collisionCheck dt tangible1 tangible2
|
let res = collisionCheck tangible1 tangible2
|
||||||
in
|
in
|
||||||
case res of
|
case res of
|
||||||
c@(OverlapCollision _) ->
|
c@(OverlapCollision _) ->
|
||||||
|
@ -98,7 +98,7 @@ update level dt = liftIO $ do
|
||||||
d
|
d
|
||||||
dt
|
dt
|
||||||
in
|
in
|
||||||
resetImpactForces $ resetCollisionOccurence $
|
resetImpactForces $ flip updateCollisionOccurence False $
|
||||||
if collisionOccured inter
|
if collisionOccured inter
|
||||||
then addLoads inter (impactForces inter)
|
then addLoads inter (impactForces inter)
|
||||||
else addLoads inter constG
|
else addLoads inter constG
|
||||||
|
|
Loading…
Reference in a new issue