Hi,
I've been looking at the one-sided platform example and the code is self-explanatory. The problem I have is in the PreSolve method, how to let it know about my fixtures I want to check when it is in a separate class. For instance one of my fixtures is named _playerFixture, this is in my MainGameLayer, the PreSolve method is in a class called MyContactListener, so how would it know about _playerFixture?
void MyContactListener::PreSolve(b2Contact* contact, const b2Manifold* oldManifold) {
b2Fixture *fixA = contact->GetFixtureA();
b2Fixture *fixB = contact->GetFixtureB();
if(fixA == _playerFixture ) <---- how can it see _playerFixture
{
}
// etc
}
Obviously I must have a design problem, any help/advice is much appreciated.
Regards,
Steve