Giter Club home page Giter Club logo

Comments (12)

grayleonard avatar grayleonard commented on May 21, 2024

Ran into this additional effect of the bug:

out

With square tiles, the sprite goes straight through, but with sloped tiles this happens.

from phaser-arcade-slopes.

hexus avatar hexus commented on May 21, 2024

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 collide or overlap to check for these collisions? Or are you checking the overlap properties set on the body?

from phaser-arcade-slopes.

grayleonard avatar grayleonard commented on May 21, 2024

Using the Arcade collide function, not doing any manual checking. Is it possible to disable that heuristic as a temp workaround?

from phaser-arcade-slopes.

hexus avatar hexus commented on May 21, 2024

It should be yes, I'll check for you.

from phaser-arcade-slopes.

hexus avatar hexus commented on May 21, 2024
game.slopes.solvers.sat.options.restrain = false;

:)

from phaser-arcade-slopes.

grayleonard avatar grayleonard commented on May 21, 2024

👍 seems to be working! Thanks.

from phaser-arcade-slopes.

hexus avatar hexus commented on May 21, 2024

Awesome, no worries.

from phaser-arcade-slopes.

hexus avatar hexus commented on May 21, 2024

When 0.2.0 is released you will be able to achieve the same thing with a shorter syntax (d530f30).

game.slopes.heuristics = false;

from phaser-arcade-slopes.

hexus avatar hexus commented on May 21, 2024

@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.

from phaser-arcade-slopes.

grayleonard avatar grayleonard commented on May 21, 2024

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.

from phaser-arcade-slopes.

grayleonard avatar grayleonard commented on May 21, 2024

(Feel free to close this issue for now though, as d530f30 resolves it)

from phaser-arcade-slopes.

hexus avatar hexus commented on May 21, 2024

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.

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.