[LibGDX] [3D] Getting a Collision Shape from a 3D model with Bullet Physics

Hey guys,

I made a post asking if the fbx-conv of LibGDX messed up the size of the G3DB file format when converted from a FBX, because it was different with OBJ. (http://www.java-gaming.org/topics/libgdx-blender-fbx-conv-messing-up-with-model-scale-when-converting-from-fbx/36932/view.html).

The problem with that, for me, is the Collision Shape that you get from Bullet Physics: With OBJ converted to G3DB, the collision shape works fine, but with FBX converted to G3DB it looks the same but other objects are not colliding with it.
Right now I’m only using btCollisionShape shape = Bullet.obtainStaticNodeShape(model.nodes);.

Anyone has experience with Bullet Physics and Collision Shapes?
My file might have a problem though, it could be, so I’m attaching them.
My files: https://drive.google.com/file/d/0BziW53Fw7ZDqU1A4U3ZacHNoSk0/view?usp=sharing

Kind Regards,

Sebastián.

Hi Sabastian,

I’ve also run into the same problem and haven’t yet been able to solve why, did you manage to crack it?

I originally used the monkey blender model and which registered collisions just fine.
Then I spend ages making my own custom model (low poly count) and exported that, but the collisions do not work with my custom model for some reason.

I’ve tried checking the transformation settings in Blender but they all appear to be ok.

Anyone have any ideas about this? I’m guessing it’s probably something really straight forward that I’m missing.

Cheers,
David

I know this thread is old, but i’ve found it when i’ve encountered the same problem, so hopefully my response will help someone in the future.

What worked for me was adding Rigid Body to the model in Blender. You can find this option under Physics tab, or check in the documentation.
Just add one and leave it with default values, it will do.