[Solved]PhysicsCollisionListener doesn’t detect collision

maybe you mean initialize PhysicsCollisionListener from Application an then pass “a pointer” to the listener it to others Thread or where is needed?

It’s the right things according the “story” of opengl thread, it works, and I’ll use it

No I do not mean that.

(copied from TestSimplePhysics)

[java]

public void simpleInitApp() {

bulletAppState = new BulletAppState();

stateManager.attach(bulletAppState);

}

[/java]



Just do that and you can listen from any thread by using getStateManager().getState(BulletAppState.class).getPhysicsSpace().addCollisionListener().

ok, I’ve found the error: I was adding the CollisionListener overloading initialize(AppStateManager stateManager, Application app) {} of the BulletAppState, but it simply doesn’t been call.

changed to overload startPhysic(){} and everything works fine.

Now I’m going to move the graphics from Application to another AppState, but this is another story :slight_smile: