-
Notifications
You must be signed in to change notification settings - Fork 16
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
Tile collision direction flags #27
Comments
Awesome, I'm glad it's helpful for you. Actually, the plugin doesn't properly support this yet and probably should in some way. I'll add this to the roadmap for v0.2.0. It's a compatibility feature I initially left out because the meaning of these directions changes a little once you introduce 45 degree angles. I'm sure I can work something out though, and this will be useful in my own games too. |
Are there any work-arounds I can try in the meantime? I wouldn't mind hacking around your plugin a little, but I'm still not sure how to go about one way collisions with it. |
Hopefully I'm right in thinking that all it will take is changing these lines: For example, this part of a condition: tile.slope.edges.top === Phaser.Plugin.ArcadeSlopes.TileSlope.EMPTY && ... becomes: (!tile.collideUp || tile.slope.edges.top === Phaser.Plugin.ArcadeSlopes.TileSlope.EMPTY) && ... The same would need to be done for bottom, left, right, etc. I'd probably do this more formally for the actual implementation. |
@hexus |
Awesome. Your Mario project looks cool too, I'm glad the plugin helps you to build it. |
Fixed above. Thanks for bringing this up. 👍 |
Hi Hexus,
I'm really enjoying you're slopes plugin, its exactly what I needed for my game.
I'm trying to implement jumping through a platform from underneath. I believe normally for a tilemap you can just set the parameter
collideDown
tofalse
for each tile. Since your plugin uses tilemaps, I've tried doing this but still get collisions from below so I can't jump through. Is there a specific way to turn off down collisions for your slopes plugin or am I doing something wrong? Thanks!The text was updated successfully, but these errors were encountered: