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
Improve tunnelling #36
Comments
Thanks, this is probably to do with the heuristics that try to avoid objects catching on the corners of sloped tiles that are placed next to each other. I'll try flinging some tiny projectiles at such tiles myself to see if I can reproduce the problem. Out of interest, are you using |
Using the Arcade |
It should be yes, I'll check for you. |
game.slopes.solvers.sat.options.restrain = false; :) |
👍 seems to be working! Thanks. |
Awesome, no worries. |
When 0.2.0 is released you will be able to achieve the same thing with a shorter syntax (d530f30). game.slopes.heuristics = false; |
@grayleonard Just to confirm, regarding this issue, were you destroying bullets in a collision callback? I have a feeling the plugin simply isn't running the callback properly because of the heuristic restraints, and they aren't destroyed on those slope because they're no longer colliding with them; they're actually moving perfectly in parallel with them because there's no gravity. |
Yes, I was destroying the bullets within the collision callback, and I have gravity set to 0. It might be necessary for the project I'm working on to use the heuristics for other sprites, so I might do a bit of debugging on my own and let you know what I figure out. |
(Feel free to close this issue for now though, as d530f30 resolves it) |
Cool. Right now I don't think heuristics can be enabled per-sprite but I will add a flag that allows this. I was leaving this open because I think I can make improvements for 0.2.0, and have features planned for 0.3.0 relating to this too. I might just make new issues for these things though. :) Thanks for your input here. |
As per phaserjs/phaser-ce#94 and the road map, improvements can be made to tunnelling issues that can occur with small sprites.
In the linked issue, it looks like the projectiles are only colliding with the tile face and not the entire tile.The linked issue is caused by heuristics preventing collisions, and because the square tile has no "preferred axis" to separate on, no separation seems to occur. This is rather wrong! Pre v0.3.0, this could be solved by improving heuristics or simply not using them for square tiles.
In the case of the half tiles in the GIF below, the separation is responding correctly but without invoking collision callback, which is wrong.
There are two issues here that will be addressed by planned features in the v0.3.0 roadmap:
For 0.2.0 we want to at least make sure that the collisions and their callbacks are responding correctly; even if no separation occurs, it's still a collision the user could need to know about.
Deciding the response vector in these situations is tricky.
The text was updated successfully, but these errors were encountered: