Hello, i’m new in jme, maybe my problem is simple, but i’m cant figure it out.
So, i run example from wiki - TestFancyCar . Everything works great.
Then i try to change car to my model from 3d max.
I use OgreMax to export .scene from .max file.
When i’m making CollisionShape from body without wheels mesh (like in example), CollisionShape is shifted.
My code:
assetManager.registerLocator(“files/models/btr”, FileLocator.class); //Регистрируем путь
carNode = (Node)assetManager.loadModel(“btr.scene”);
Texture tex = assetManager.loadTexture(“BTR80.PNG”);
Material mat = new Material(assetManager, “Common/MatDefs/Misc/Unshaded.j3md”);
mat.setTexture(“ColorMap”, tex);
carNode.setMaterial(mat);
carNode.setShadowMode(ShadowMode.Cast);
Geometry chasis = findGeom(carNode, “body”);
BoundingBox box = (BoundingBox) chasis.getModelBound();
//Create a hull collision shape for the chassis
CollisionShape carHull = CollisionShapeFactory.createDynamicMeshShape(chasis);
//Create a vehicle control
player = new VehicleControl(carHull, mass);
carNode.addControl(player);
Result (ball is behind not below):
Any suggestions?
Thank you in advance