Is there a way to join 2 com.jme3.bullet.collision.shapes.CollisionShapes to form a more complex shape… e.g. put a sphere on top of a cylinder to make a lollypop, or two elongated boxes at right angles to make a cross shape ? Can I make the second shape a ‘child’ of the first similar to nodes ?
All I can think if is to create a 6dof joint between the two and limit the rotations, but surely I’m missing something way simpler.
Thanks guys.
I think if you pass the parent node of the two shapes to CollisionShapeFactory.createMeshShape, it will create the appropriate collision shape for you.
Thanks ancalagon, you got me pointed in the right direction…
CompoundCollisionShape - " A CompoundCollisionShape allows combining multiple base shapes to generate a more sophisticated shape."
I was poking around for a couple of hours, I don’t know how I could have missed this… facepalm
Never used CompoundCollisionShape, but yeah I’m sure that would work fine. I just use the static class CollisionShapeFactory which takes care of all the details for me. Look at tutorial 9 to see how its used.