Code Monkey home page Code Monkey logo

Comments (6)

hexus avatar hexus commented on May 16, 2024 1

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.

from phaser-arcade-slopes.

hexus avatar hexus commented on May 16, 2024 1

Hopefully I'm right in thinking that all it will take is changing these lines:

https://github.com/hexus/phaser-arcade-slopes/blob/v0.2.0-alpha2/src/ArcadeSlopes/SatSolver.js#L611-L626

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.

from phaser-arcade-slopes.

kevin-chau avatar kevin-chau commented on May 16, 2024

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.

from phaser-arcade-slopes.

kevin-chau avatar kevin-chau commented on May 16, 2024

@hexus
Just confirmed that what you suggested works for me! Thank you for your help!

from phaser-arcade-slopes.

hexus avatar hexus commented on May 16, 2024

Awesome.

Your Mario project looks cool too, I'm glad the plugin helps you to build it.

from phaser-arcade-slopes.

hexus avatar hexus commented on May 16, 2024

Fixed above. Thanks for bringing this up. 👍

from phaser-arcade-slopes.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.