phil1234 Posted October 7, 2015 Share Posted October 7, 2015 hi, I just found out I had to multiply the pivot matrix values to compensate the object scaling is there no way to have the matrix transform applied AFTER the scaling ?mesh.setPivotMatrix(BABYLON.Matrix.Translation(10,0,0)); // got to multiply by 10 to compensate 0.1 scale ...mesh.scaling=new BABYLON.Vector3(0.1,0.1,0.1);also I found odd that "mesh" is used as the object holding everything instead of beeing the object holding only faces and vertices like in any other 3D api regards Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted October 7, 2015 Share Posted October 7, 2015 Hey Phil, just set mesh.position to get a translation matrix applied after the scaling And for your second point: we are not like any other API Wingnut 1 Quote Link to comment Share on other sites More sharing options...
phil1234 Posted October 8, 2015 Author Share Posted October 8, 2015 Hey Phil, just set mesh.position to get a translation matrix applied after the scaling And for your second point: we are not like any other API It works, but then the rotation I do at each frame, is back to the object's center instead of 0,0,0witch is not what I want it's a matter of logic, scenegraph nodes can represent anything(light, camera, ...) , 3D objects are a "particular" case that holds a mesh and materials,I mean your API does the same, but I would'nt have called it mesh, that's all :-) Quote Link to comment Share on other sites More sharing options...
Wingnut Posted October 8, 2015 Share Posted October 8, 2015 Hi Phil Quote it's a matter of logic, scenegraph nodes can represent anything(light, camera, ...) , 3D objects are a "particular" case that holds a mesh and materials, Actually, BJS has no "node" called 3D object. BJS nodes are lights, cameras, and mesh. BJS mesh do not "hold" materials and vertexData... they REFERENCE them. Lights are as much a "particular" node as meshes are. Lights "have" methods and properties particular to lights. Cameras are the same... they are "particular" in that they "have" properties and methods for cameras only. The only logic-difference between these three node-types... is in your mind, and was likely put there when you were using one of the many inferior-to-BJS frameworks. BJS is faster, easier, and more versatile than the lesser frameworks. You're in the big league, here. If you reallocate the time you spend shining a bright light in the face of BJS and trying to interrogate it... to using forum and github searches so you don't ask the same questions that have already been answered 50 times, you will learn that what I say... is true. And if you cannot cope and deal with driving the world's best webGL framework, then I suppose you will need to write your own framework or drop back down to the lesser frameworks. BJS is not for everyone... even though it certainly is. But we ARE a little low on girls, in my opinion. http://playground.babylonjs.com/#1XOMH0 - 45 lines of actual code. Let's see you do that in 45 lines of code... with one of your often-referenced inferior frameworks. I bet you can't. Let's see what ya got. GameMonetize 1 Quote Link to comment Share on other sites More sharing options...
phil1234 Posted October 8, 2015 Author Share Posted October 8, 2015 yes, never enough girls :-) Wingnut 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.