Skip to content
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

Default Box2DWorld in the scenetree #32

Open
briansemrau opened this issue Dec 10, 2020 · 0 comments
Open

Default Box2DWorld in the scenetree #32

briansemrau opened this issue Dec 10, 2020 · 0 comments
Labels
enhancement New feature or request

Comments

@briansemrau
Copy link
Owner

briansemrau commented Dec 10, 2020

There should be a default Box2DWorld singleton so that scenes do not need to add a Box2DWorld to be able to simulate.

Note:
This will change the way the current b2 object lifecycle works. Rather than creating/destroying only in ENTER/EXIT_TREE, b2 objects will be created on READY or in the constructor (whichever Godot uses in their physics nodes). This may leave some optimization to be desired, as creating a new body in a non-default space might always follow the path: [READY: create in default world] -> [ENTER: delete from default, create in new space from tree]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant