So I've got a game manager, and an entity class.
The game managers constructor sets up b2World via game::game(b2Vec2& grav, bool sleep) : world(grav, sleep) (If theres a better way to do this please tell me)
The entity ctor sets up the body defs.
The game manager has a method called register, which passes a b2World to the entitys register function, which creates the body and adds a fixture.
Then, the entitys draw function is called. In here, this code is run:
However, that line just plain out crashes my program (it compiles fine)
I've checked the source, and the definition for GetPosition is there, yet it crashes.
The helloworld example (Which also uses GetPosition) works fine.
Also, note that for some odd reason my debugger doesn't work, so I've been debugging by printing out lines whenever something happens.
The game managers constructor sets up b2World via game::game(b2Vec2& grav, bool sleep) : world(grav, sleep) (If theres a better way to do this please tell me)
The entity ctor sets up the body defs.
The game manager has a method called register, which passes a b2World to the entitys register function, which creates the body and adds a fixture.
Then, the entitys draw function is called. In here, this code is run:
Code:
b2Vec2 vec = body->GetPosition();
However, that line just plain out crashes my program (it compiles fine)
I've checked the source, and the definition for GetPosition is there, yet it crashes.
The helloworld example (Which also uses GetPosition) works fine.
Also, note that for some odd reason my debugger doesn't work, so I've been debugging by printing out lines whenever something happens.