box2d icon indicating copy to clipboard operation
box2d copied to clipboard

b2World class does not have default constructor

Open nahiim opened this issue 2 years ago • 0 comments

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));

nahiim avatar Dec 20 '23 07:12 nahiim