Giter VIP home page Giter VIP logo

Comments (4)

aJamDonut avatar aJamDonut commented on May 22, 2024

@dragonwhites I've also just started to get this issue while refactoring some code. I do think it's my code, but all the bodies do seem correct. But did you find a fix in the end?

from matter-js.

dragonwhites avatar dragonwhites commented on May 22, 2024

@dragonwhites I've also just started to get this issue while refactoring some code. I do think it's my code, but all the bodies do seem correct. But did you find a fix in the end?

I do not find the fix, since I can't replicate the issue and it's super rare, I just updated the library to 0.19 and hope for the best.... May I know what is your library version?

from matter-js.

aJamDonut avatar aJamDonut commented on May 22, 2024

@dragonwhites I've also just started to get this issue while refactoring some code. I do think it's my code, but all the bodies do seem correct. But did you find a fix in the end?

I do not find the fix, since I can't replicate the issue and it's super rare, I just updated the library to 0.19 and hope for the best.... May I know what is your library version?

Version: * matter-js 0.19.0 in UMD format

I've managed to resolve my issue now, I'm pretty sure the issue isn't caused by matter per-se or by bodies you've added to the system, more when applying changes to existing bodies, that are malformed changes.

In my case, when re-loading a file, the Body.setAngle() function was the root cause to this issue. Inside this function it recalculates the vertices, which I had passed a bad value to.

Good luck if it pops up, one recommendation I have is if it seems like all the bodies are fine, instead look at changes you're making to your bodies, angle, size etc.

from matter-js.

aJamDonut avatar aJamDonut commented on May 22, 2024

On another note it appears setAngle (and so I assume others) has no checks for any of the values passed and so no type safety there, in my case I passed NaN

from matter-js.

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.