Zim Posted November 8, 2018 Share Posted November 8, 2018 Hello everyone! I've been strugoogling with the following behavior I get importing a Blender model into Babylon, which it is still about importing a LDraw model (see my previous and first thread), and I still don't know whether it's a problem with Blender, BJS or Cannon.js. In Blender, on my imported LDraw vehicle model, I set an origin on each geometrical wheel center in order to be able to make them rotate along the x axis (when the vehicle is moving forward or backwards) and along the y axis (for the steering). Then, I create a wired cube with the same origin as the origin of all the vehicle parts (except the wheels which has been changed) - which roughly corresponds to the geometric center of the vehicle. This cube is meant to be the vehicle's bounding box. So I resize it to fit the vehicle, and make all other parts children of it. On load in BJS, I set the cube's visibility to false, set a BoxImpostor on it, and everything look fine: the vehicle is visible and stays successfully on the ground. The problem is when pressing the directional controls to make the wheels rotate, they become squeezed (they are no more "round" (oval section instead of circular section)). I noticed that when the wheel are squeezed (when they are set a rotation value along any axis), their bounding box actually get the shape of the vehicle bounding box (which is the parent of every meshes). Consequently, when I create a cubic instead of a cuboid vehicle bounding box in Blender (the surplus volume being put above the vehicle), the wheels behave as expected and run smoothly (but the vehicle bounding box is far too big!) Does anyone know what is happening? Is it an expected behavior and the mistake is mine? Any help will be greatly appreciated! Kind regards, Zim Quote Link to comment Share on other sites More sharing options...
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.