I am trying to make a (j3o) dragon model run on a terrain which I created by scene composer (j3o). I’ve learned the tutorial 9 hellocollision but I am not sure why it doesn’t work for my project. They dont have any collision. They submerged all the time. How do I fix my code?
world=assetManager.loadModel("Scenes/earth.j3o");
CollisionShape sceneShape =
CollisionShapeFactory.createMeshShape(world);
landscape = new RigidBodyControl(sceneShape, 0);
world.addControl(landscape);
rootNode.attachChild(world);
bulletAppState.getPhysicsSpace().addAll(world);
dragon = assetManager.loadModel("Models/grog5k.j3o");
CapsuleCollisionShape capsuleShape = new CapsuleCollisionShape(1.5f, 6f, 1);
dragon_phy = new RigidBodyControl(capsuleShape, 0f);
dragon.addControl(dragon_phy);
rootNode.attachChild(dragon);
bulletAppState.getPhysicsSpace().addAll(dragon);