I’m trying to learn JBullet here, so please be patient with me.
I’ve setup CollisionWorld and CollisionObject wrappers so I can take my game entities and “plug” them into JBullet. I’m having a hard time figuring out how to get feedback from the library however.
First, I update all of my entities (if they need updating) and set their new locations and rotations. I then “synchronize” all of CollisionWorld’s objects with my entities (each entity has a reference to their collisionobject). I then use collisionWorld.performDiscreteCollisionDetection().
I can then collect all of the manifolds into an array, but how do I link them back to my entities? Also, is there any kind of feedback in the manifolds to let me know how far the entity is embedded into another (so I can perform sliding and scoot back)?
Any help is GREATLY appreciated!!!