-
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
Resizing world makes bodies moving by themselves #50
Comments
That code should work, it's the same as I'm doing in DemoMobile.js so take a look there. I'm not sure what you mean that they move, do you mean they are translated or do you mean they actually gain some velocity? |
It seems they actually gain velocity! |
Hmm that's weird. Can I see a jsfiddle? |
Did you manage to figure this one out? |
Hey! Not really, had to move to an other project, this issue is still on :/ Thanks tho! |
I can't reproduce your issue by changing the bounds max as you said in your first post. |
I think this will no longer be an issue as of #67 so closing. Please update if this is still a problem. |
Hey i noticed that im experiencing the same problem. Im trying to use
but it doesn't seem to be resizing my canvas element. Im trying to get the canvas to adjust its height and width according to the size of the viewport or window screen and change as the screen resizes, i looked at issue #67, and i made the post at #118. Im not seeing any results yet, and if you can point me in the right direction for objects sticking to the "ground" or set boundaries like at the website www.berberianmysterytheatre.com you could see the objects settling or sticking to a boundary after about 20seconds or so. Thanks again btw. |
Are you using the latest master build? If not then switching to it will resolve this. |
I don't think so, ill implement the new build and see how it turns out, and update the issue. |
I experienced this issue too but on phaser's (currently 3.22.0) implementation of MatterJS. Normally this might be fine / unnoticeable but because I was repositioning the character to the centre of the screen each frame and moving everything else based on that difference from the center point, it meant that my whole world perpetually whizzed by at particular screen aspect ratios. This might help someone so figured I'd post, no need to re-open. |
Hi!
I don't know if I'm doing that right, but I would like to use the engine in fullscreen. So on window resize, I'm adjusting the world bounds:
engine.world.bounds.max.x = window.width;
engine.world.bounds.max.y = window.height;
When I'm doing that, all the none-static bodies are moving by themselves to the right, without any interaction :/
What's happening? Is there any method to resize the world?
Thanks!
The text was updated successfully, but these errors were encountered: