Closed kevin-chau closed 7 years ago
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 Just confirmed that what you suggested works for me! Thank you for your help!
Awesome.
Your Mario project looks cool too, I'm glad the plugin helps you to build it.
Fixed above. Thanks for bringing this up. :+1:
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!