So currently I have an instance of JBullet running on its own thread and I have no idea how to get information about collisions on JBullet 20101010-1.
I have tried calling ContactAddedCallback as shown below but nothing happens.
new ContactAddedCallback() {
@Override
public boolean contactAdded(ManifoldPoint cp, CollisionObject colObj0, int partId0, int index0,
CollisionObject colObj1, int partId1, int index1) {
System.out.println("Collision");
return false;
}
};
to do that after you create a ContactAddedCallback like this ::
BulletGlobals.setContactAddedCallback( myCollisionCallback );
when you create a CollisionShape you must add userPointer like this ::
and finaly in ContactaddedCallback you can check like this ::