I am developing a 2D, underwater, action-RPG for Android, using Box2D as the physics engine, mainly for collision detection, collision response and movement of in-game characters within an environment comprised of walls, rocks, and other creatures.
I am trying to implement character animations (as per What's best way to do character animations in Box2D).
The problem is that I want to suppress the collision response when a collision happens. I have been told that I should set 'NoCollision' in the collision event, which I assume you do by b2Contact::SetEnabled(false) in the Pre-Solve Event. But, the libgdx JNI implementation doesn't implement the pre-solve or post-solve methods in the interface, as it can "be done another way" as stated here.
Does anyone have any idea how else I migh开发者_如何学Pythont do this?
I'm new to Box2D, and finding it very hard going, so any help would be much appreciated!
Never mind, I've updated the JNI interface to implement the pre and post solve methods, so now I can just use: contact.SetEnabled(false);
精彩评论