erincatto / box2d

Box2D is a 2D physics engine for games
https://box2d.org
MIT License
8.36k stars 1.54k forks source link

b2World class does not have default constructor #759

Closed nahiim closed 3 months ago

nahiim commented 11 months ago

There might be a very important reason for this (which I would like to know please, if there is)but sometimes I like to declare all my variable first(in the header file) before initialising them in the implementation file in an init() method of sort. I can't do that with b2World because it does not have a default constructor.

I can't do something like:

b2World world;
world.setGravity(b2Vec2 gravity(0.0f, -10.0f));
erincatto commented 3 months ago

Closing out v2 issues since it is no longer supported.