-
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
matter-js npm simply won't work #960
Comments
Thanks man. I love how you are so responsive. I got it working! However, since you're here I got a new problem lol. It is server side and I used the npm. I tried emitting socket events with keycodes that the server would watch for and then "move" the corresponding body that way. I tried to use Matter.Body.translate() and it worked, but it kinda "forced" the body into the other body which made them spazz. Thus, I looked at my friend's repl and heused Matter.Body.applyForce(). I tried to use it, but it didn't work. When console logging the body.force in his repl, I noticed how the force object {x: 0, y: 0} fluctuates from 0 when force is applied, signifying how much force is applied to each side and that it goes down back to 0 because the force has been well, applied and it stops. However, in my case when console logging the body.force, it ADDS UP and the force is never applied. For example, I tried adding -0.5 to the y force whenever I held down the "w" button. It should have showed the y flucuating from 0 to -0.5 but instead it kept adding up and never got applied. So if I kept holding down "w" it would eventually add up to 100+ y force and never gets released. |
Another quick update: var tickrate = 1000/60; It just simply still kept adding up. Also server side still. |
See my latest post on #559 for an update on this and please use that thread if you have further comments on this. For any other unrelated issues please open a new thread, thanks again for reporting this. |
Alright, this is the first time I've tried leaving an issue so this will be a new experience for me xD
I tried using the matter-js npm to make a multiplayer game but....
[Error: Cannot find module 'poly-decomp']
I believe that this is a problem in matter-js itself and if anybody can shine some light into this situation it would be much appreciated. I'm using version ^0.16.0 according to the package.json
The text was updated successfully, but these errors were encountered: