bytedeco/javacpp-presets

Strange callback methods in bullet3

alfabouh opened this issue · 2 comments

I'm facing a problem that I can't create a collision filter. The method is simply not overridden

this.btOverlapFilterCallback = new btOverlapFilterCallback(this.discreteDynamicsWorld.getPairCache().getOverlapFilterCallback()) {
            @Override
            public @Cast("bool") boolean needBroadphaseCollision(btBroadphaseProxy proxy0, btBroadphaseProxy proxy1) {
                System.out.println("FWE");
                return false;
            }
        };
        this.discreteDynamicsWorld.getPairCache().setOverlapFilterCallback(this.btOverlapFilterCallback);

I think this is because in the btOverlapFilterCallback class, the needBroadphaseCollision method is not defined as @virtual. The exact same situation applies to callback classes in the btCollisionWorld class. Maybe I'm doing something wrong?

Please do try to make them virtual!

What do you mean? Do I need to create a pull request?