Hey All,
I've got two quick questions...
When setting up my contact listener I've been using the values from the b2WorldManifold, which I get by doing:
...but I've noticed that when I do this in my EndContact function, it sometimes has 0 for both x and y values of the normal.
I was poking around and noticed that there's a b2Manifold returned by b2Contact::GetManifold(), which has a normal called "localNormal". I ran a few quick tests and it looked like this had correct values of the normal, even when the worldManifold had values of 0. Can someone explain to me what the difference is between these two normals, and why the world doesn't have correct values sometimes?
My second question is: After I get a BeginContact call, for the corresponding EndContact call are the fixtures going to be in the same order? As in, the fixtureA from BeginContact is going to be fixtureA in EndContact, and the fixtureB from BeginContact is going to be fixtureB in EndContact.
Thanks,
-Dave
I've got two quick questions...
When setting up my contact listener I've been using the values from the b2WorldManifold, which I get by doing:
Code:
void PhysicsContactListener::BeginContact(b2Contact* aContact) {
b2WorldManifold worldManifold;
aContact->GetWorldManifold(&worldManifold);
b2WorldManifold worldManifold;
aContact->GetWorldManifold(&worldManifold);
...but I've noticed that when I do this in my EndContact function, it sometimes has 0 for both x and y values of the normal.
I was poking around and noticed that there's a b2Manifold returned by b2Contact::GetManifold(), which has a normal called "localNormal". I ran a few quick tests and it looked like this had correct values of the normal, even when the worldManifold had values of 0. Can someone explain to me what the difference is between these two normals, and why the world doesn't have correct values sometimes?
My second question is: After I get a BeginContact call, for the corresponding EndContact call are the fixtures going to be in the same order? As in, the fixtureA from BeginContact is going to be fixtureA in EndContact, and the fixtureB from BeginContact is going to be fixtureB in EndContact.
Thanks,
-Dave