Skip to content
This repository has been archived by the owner on Nov 12, 2024. It is now read-only.

Commit

Permalink
fix unresolveable collisions in beforePhysicsResolve (#827)
Browse files Browse the repository at this point in the history
  • Loading branch information
neverUsedGithub authored Mar 7, 2024
1 parent 86225da commit 90e012d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/kaboom.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4391,10 +4391,11 @@ export default (gopt: KaboomOpt = {}): KaboomCtx => {
}

this.trigger("beforePhysicsResolve", col)
other.trigger("beforePhysicsResolve", col.reverse())
const rcol = col.reverse()
other.trigger("beforePhysicsResolve", rcol)

// user can mark 'resolved' in beforePhysicsResolve to stop a resolution
if (col.resolved) {
if (col.resolved || rcol.resolved) {
return
}

Expand Down

0 comments on commit 90e012d

Please sign in to comment.