Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix skipped collisions between tiles #38

Closed
hexus opened this issue May 11, 2017 · 3 comments
Closed

Fix skipped collisions between tiles #38

hexus opened this issue May 11, 2017 · 3 comments
Assignees
Labels
Milestone

Comments

@hexus
Copy link
Owner

hexus commented May 11, 2017

There's an issue with heuristics that skip collisions between tiles.

Small enough objects can slip between tiles, as seen here:

https://github.com/photonstorm/phaser-ce/issues/94#issuecomment-290867117

Reproduce and fix the hell out of it without touching SAT.js for the time being.

This is related to #36. Disabling heuristics fixes the issue so that's likely where the it lies.

@hexus hexus added the bug label May 11, 2017
@hexus hexus added this to the 0.2.0 milestone May 11, 2017
@hexus hexus self-assigned this May 11, 2017
@hexus
Copy link
Owner Author

hexus commented May 11, 2017

Try adding heuristics for the square tiles too, as absurd as it might seem.

You'll probably need to allow returning the preferred separation axis from heuristics callbacks, to handle each edge case (literal edges... in this case... oh).

hexus added a commit that referenced this issue May 16, 2017
Particle controls have just been implemented here, though, for testing issue #38.
@hexus
Copy link
Owner Author

hexus commented May 18, 2017

This is fixed for square tiles.

image

Let's see what we can do about slope seams next. Again, it only seems (hah) to affect bodies that are particularly small relative to the tile.

image

hexus added a commit that referenced this issue May 18, 2017
Covered most cases, but edge cases include entering and exiting square tiles at diagonals. This isn't really the right solution, but it helps. We can wait for 0.3.0 for the real fix.
hexus added a commit that referenced this issue May 18, 2017
@hexus
Copy link
Owner Author

hexus commented May 18, 2017

Covered most cases, but edge cases include entering and exiting square tiles at diagonals. This isn't really the right solution, but it helps. We can wait for 0.3.0 for the real fix.

This will do for now.

@hexus hexus closed this as completed May 18, 2017
hexus added a commit that referenced this issue May 18, 2017
Sneaky last minute change for #38.
hexus added a commit that referenced this issue May 19, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant