[SOLVED...?] CapsuleCollisionShape with collideWith() and/or alternative to collision

I currently have an error when I was doing it, everything is fine except one line of code.
bulletAppState.getPhysicsSpace().addCollisionListener(this);

It gave me an when run saying: RuntimeException: Uncompilable source code - Erroneous sym type: com.jme3.bullet.PhysicsSpace.addCollisionListener

And when I went with it’s suggestion to be
bulletAppState.getPhysicsSpace().addCollisionListener((PhysicsCollisionListener) this);

This error occured: ClassCastException: mygame.Main cannot be cast to com.jme3.bullet.collision.PhysicsCollisionListener

Do you know how to solve this?

1 Like