Internal Collisions

I’m still playing with JME3 derived from the helloPhysics tutorial.



I imported some models from Sketchup->Blender->JME3, but noticed some strange interaction with collisions, so I instead made a big Box(), and a collisionShape for it, and added it to a PhysicsNode, then placed it in the scene. Collisions from outside work as expected, but from the inside, objects can pass right through.



I know this is because the normals are pointing out. How do I fix this? Is there another collisionShape I can add for internal, or do I need to create another box object and have it inverted (normals in)?

This is true for the basic “convex” shapes (box, sphere etc), you could use mesh collision shapes, which are “concave” shapes and work from both sides.

Cheers,

Normen

Aha. That works. I just discovered that my cannonballs are too fast. Sometimes they go through the walls without a collision. I slowed them down and now they collide.



Now, how do I make the walls visible on the inside?

For your bullet problem you can use continuous collision detection, see jmetest.bullet.TestCcd.java