I wanted to give the native blender import a try It worked so far, but there is a strange issue with vehicles.
I created a simple plane in blender and saved it as .blend file. I then copied PhysicsTestHelper.java and TestPhysicsCar.java into a new Project and instead of the floorBox I loaded the blender file:
[java]
//Box floorBox = new Box(140, 0.25f, 140);
//Geometry floorGeometry = new Geometry(“Floor”, floorBox);
I hope that someone can help me, because I’d like to create some kind of race track in blender and load it directly, but I have no idea, why the wheels start to accelerate if they hit the model. If I remove all wheels from the vehicle, the box just collides with the plane as expected. Is this an issue with blender and bullet?
I tried setting different values for the restitution of the plane, but it has no effect (except for the bounciness of course, but the wheels still accelerate on their own). Does the blender importer import any kind of physic settings? If I use a Plane Object from jME3 instead everything seems to be fine. I wonder what is different between a simple plane imported from blender and a plane from jME3.
I don’t know if it makes any sense or if you already did it, but you can try to apply the object’s visual transform to its data by doing ctrl+a ----> visual transform.
I think I’m running into similar behavior and I think this is not so much a physics issue but a blender import issue.
In my case I’m using a heightmap image for the terrain, but I’m using a bridge I created in blender.
My car is working fine while driving over the heightmap terrain, but it fails when I try to drive over the bridge. Depending on which side I try to enter, it will either push me away or propel me along at high speed over the bridge. My wheels will also sink through the top layer.
The direction is constant. I’ve tried rotating the parts that make up my bridge 180 degrees, after which I had the same behavior, but in the opposite direction.
I’ve simplified my bridge parts to a rectangular box, which did not change the behavior.
After reading your posts I replaced the blender boxes with a simple box geometry of the same dimensions and suddenly it behaves as expected.
I’m wondering if this might be an issue with incorrect normal vectors. In blender the down vector is along the z axis, while in jme3 it is along the y axis. Lightning seems to be in order though.
I seem to have solved our problem, or at least found a work around…
In blender, in edit mode, rotate the mesh -90 degrees around the x axis. This way the y axis points upwards in the same way as it is in jme3. Then, in object mode, rotate it 90 degrees around the x axis to have it look the same way as before. After this, it will work as expected.
I’m not certain if this behavior is intended. My initial guess would be that local and global orientations got mixed up. Perhaps someone with more knowledge on the blender import can answer that?
The issue is definitely with the blender import and not the physics though.