Hi, my bullets normally always explode when they hit something, but sometimes they rebound and no contact happens.
Should I make my own contact listener instead?
I saw something like this: But I don't want to set the world contact listener, only a contact listener for 1 body.
Thanks,
r_bewick
Should I make my own contact listener instead?
Code:
ContactEdge ce = m_body.getContactList();
while (ce != null)
{
if (ce.contact.isTouching())
{
m_bAlive = false;
}
ce = ce.next;
}
while (ce != null)
{
if (ce.contact.isTouching())
{
m_bAlive = false;
}
ce = ce.next;
}
I saw something like this: But I don't want to set the world contact listener, only a contact listener for 1 body.
Code:
org.jbox2d.dynamics.World.setContactListener(new ContactListener() {
...
});
...
});
Thanks,
r_bewick