boris Posted May 16, 2017 Share Posted May 16, 2017 Hi everyone, first i just want to say that after more than a year working with three.js i have decided to migrate to babylonjs. the frameworks looks great and this forum is a bog help. background: my scene is basiclly a house and furinture. every mesh i load into my threejs scene has a position and rotation that its suppose to be in. now, to migrate successfuly in need that the new scene (babylon) will look the same as the old scene (threejs). i got two big problems: 1. the x-axis was inverted, so all my meshes was looking as if were mirroed (fixed it with mesh.scale.x = -1) 2. the position that i used in threejs for my meshes, is not the same as in babylon.js. this is the original location of the sofa in three.js this is the location of the sofa in babylon.js (after i inverted the x-axis) can u please help me think of a way to migrate all the meshes to their right position? Wingnut 1 Quote Link to comment Share on other sites More sharing options...
JohnK Posted May 16, 2017 Share Posted May 16, 2017 Hi and a warm welcome from me. Never worked with three.js so cannot answer your questions but may I make some suggestions that could help others answer your question. 1. Please tell us what you used to migrate from three to babylon. 2. The positions of the rooms and doors look to be in the right place. What is different about the sofa? 3. This is a simple playground http://www.babylonjs-playground.com/#1N8BHW. Would it be possible for you to set the position of the box to the position where you would expect the sofa to be. Then if possible add in the migrated sofa or if not create a new box and using the positions of the sofa as migrated show the new box. Quote Link to comment Share on other sites More sharing options...
NasimiAsl Posted May 16, 2017 Share Posted May 16, 2017 hi try enable scene.useRightHandedSystem = true; maybe that help Quote Link to comment Share on other sites More sharing options...
boris Posted May 17, 2017 Author Share Posted May 17, 2017 On 5/16/2017 at 7:00 PM, NasimiAsl said: hi try enable scene.useRightHandedSystem = true; maybe that help amazing!! saved the day. this fix it almost 100%. the only thing left is to fix the x-axis and z-axis directions. meaning, foreach imported mesh, assign: mesh.position.x = originalLocation.z * (-1) mesh.position.z = originalLocation.x thanks a lot for ur help NasimiAsl and JohnK 2 Quote Link to comment Share on other sites More sharing options...
NasimiAsl Posted May 17, 2017 Share Posted May 17, 2017 u r welcome to Babylonjs Community boris 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.