Hello,
I am having trouble trying to set up my physics class in C++ using Box2D. Every time I try to set the World variable to the Gravity variable, I keep getting this error, 1 IntelliSense: no instance of constructor "b2World::b2World" matches the argument list
argument types are: (b2Vec2 *, bool)
I assume, there is something wrong with converting the variables, but I can't exactly pinpoint it. I'll post my code.
//Physics.CPP
#include "main.h"
#include "physics.h"
Physics::Physics()
{
X_Grav = 0.0f;
Y_Grav -= 10.0f;
Sleep = true;
Gravity = new b2Vec2(X_Grav,Y_Grav);
World = new b2World(Gravity,Sleep); //error comes from this
}
//Physics.h
class Physics
{
public:
Physics();
~Physics();
b2Vec2* Gravity;
b2World* World;
bool Sleep;
This is only some of the code, I think it is enough to help figure out what the problem is. I can post more code if it is needed. Thanks.