Glitchy boxes

I’m working on a game right now with very simple physics. I’m trying to get just simple boxes with box geometry to spawn in. When I use the CollisionShapeFactory.createBoxShape() method, the boxes fall right through my world model. When I use createDynamicMeshShape(), they glitch halfway into the ground, shake uncontrollably, and eventually fall through the world. I obviously can’t use createMeshShape because they are dynamic rigid bodies. The world model uses createMeshShape for it’s collision. createDynamicMeshShape made the world too unaccurate for being the world model, and I can’t use createBoxShape because I need complex, polygon by polygon collision. I’m very confused here. Any help is appreciated.



EDIT: I fixed it! Instead of using those methods I just assigned the rigid body control as a control to the geometry of the box and it worked perfectly.

Hey. So adding the control to the Geometry fixed the glitchy behaviour? I’m facing the same problem as you’re describing. However trying to add it to the geometry (which is a bit tricky when the model is loaded from an j3o file) instead of the Spatial/Node doesn’t change anything!

I’m using BoxCollisionShape based on the objects bounds to have as simple collision shape as possible (the model in question is an arrow being shot from a bow)

It works OK with a cube shape (which of course doesn’t correspond to the arrow bounds).