-
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
Making width and height defeault for the bounds. #67
Comments
This is indeed an issue. I'm likely going to remove world bounds very soon, as their main purpose was to disable out of world bodies to prevent the browser from locking up when simulations glitched in early development. But if I decide to keep them, I'll add a fix for this. Thanks. |
Is there any issue currently with setting the world bounds to be Infinity and -Infinity? |
Yep that should work fine (or are you having an issue)? |
I was not having an issue, I was just asking in case it messed up some calculations somewhere that I might not know about. Thanks for the fast reply! |
Hy. I mean what i have a same problem. I don't undersatand what i do wrong. For example - http://kroteg.com/boxes/ Objects sticks in center of canvas. How i can solved this? |
@jankovsky
|
There is no chance to set the boundaries of the world with this: this.engine = Engine.create()
this.engine.world.bounds = { min: { x: 0, y: 0 }, max: { x: s.width, y: s.height } } It's just. Doesn't. Work. AT ALL |
@vostokwork what do you want worlds bounds to do? They don't really apply to anything in practice (they used to have a purpose, but are due to be removed). If you need collisions you should use static bodies like in the examples. |
For example if I set the height and width of the render window to 1600 by 600 with the engine.create options, the bounds stay at 800 by 600 (which is the default). What you have to do is update the bounds. I just think for some it might be easier that the height and width defaults to the bounds unless you change it like below.
The text was updated successfully, but these errors were encountered: