Like the 1st, 2nd, last etc. Is this possible?
How to get a specific fixture, in a fixture list.
FlashTry something like this:
Code:
b2Fixture *getFixture(int num)
{
int i = 0;
b2Fixture *fixture = fixtureList;
while (fixture) {
if (i == num) {
return fixture;
}
fixture = fixture->GetNext();
i++;
}
return NULL;
}
{
int i = 0;
b2Fixture *fixture = fixtureList;
while (fixture) {
if (i == num) {
return fixture;
}
fixture = fixture->GetNext();
i++;
}
return NULL;
}
Original thread: https://box2d.org/forum/viewtopic.php?t=5732