-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Getting NaN when following instructions for Node.js implementation #200
Comments
I am also receiving this same issue, it seems to only happen after the initial engine tick. |
This is because
See the docs for Matter.Engine.update. |
Thanks @liabru, I'll get moving with this project again ;) |
I am experiencing a similar issue. angle and some other angle related properties, as well as axes, all are plagued by NaN. I have at least narrowed down the problem to one of these lines of code:
When I comment out setAngle, setAngularVelocity, and setInertia, i no longer get the NaN problem but the bodies do not move as I want them to. buckets.walking[b].body isStatic = false (when I set it to true, but leave all code intact no problem arises). EDIT: I Just pulled the lastest build to make sure it wasn't an outdated problem |
@Shadowstep33 is this on node or in the browser? Do all of those setters cause NaN or can you narrow it to one? Can you try debugging and stepping through? |
We've been trying to get this working server-side in Node.js, and for some reason movements are resulting in NaN for x/y positions. We used the code example provided here: #101 (comment)
CodePen example: http://codepen.io/anon/pen/dGKeJq
Sorry if this is just something silly we missed, but after a lot of fiddling, I can't work it out.
The text was updated successfully, but these errors were encountered: