SolidCatuar Posted June 9, 2014 Share Posted June 9, 2014 Hi everyone, I'm a new user of babylon.js and i'm trying to understand what the [meshe].getWorldMatrix() and the [scene].getTransformMatrix() matrix are representing. What is a WorldMatrix ? when I try to recuperate the world matrix of a picked mesh, I obtain a 4*4 matrix with the Identity Matrix for 3*3 Submatrix at the top left, and with the 3D position at the 4th line and I don't understand why it is like that. And concretely, how the 'Project' function is running ? I have good knowledge in algebra but I have trouble with the documentation. Thanks ! Quote Link to comment Share on other sites More sharing options...
gwenael Posted June 9, 2014 Share Posted June 9, 2014 Welcome on board SolidCatuar. The following link could be helpful: http://www.html5gamedevs.com/topic/3083-spaces-world-parent-pivot-local/?p=19938 especially the "Things to remember" section. It doesn't explain everything so I'll try to give you more information if after reading this you still need it. Quote Link to comment Share on other sites More sharing options...
SolidCatuar Posted June 9, 2014 Author Share Posted June 9, 2014 Hello gwenael, thanks for your fast response I had already seen this post but it doesn't really help me for the time being because I don't understand the basics. Can you explain me what is this world matrix ? What will I learn by playing with your jsfiddle (http://jsfiddle.net/...enmuller/Wcegj/) ? And is that what you call 'space' are basic space transformation ? Quote Link to comment Share on other sites More sharing options...
gwenael Posted June 9, 2014 Share Posted June 9, 2014 I haven't read the whole discussion but that seems to contain answers to your questions: http://www.gamedev.net/topic/594083-transformations-and-the-world-matrix/ Quote Link to comment Share on other sites More sharing options...
SolidCatuar Posted June 10, 2014 Author Share Posted June 10, 2014 In this topic it is stated that "The world matrix represents the scale, rotation and position of the object in the world", but world matrix is a 4*4 matrix so what the 4th line is representing ? Quote Link to comment Share on other sites More sharing options...
gwenael Posted June 10, 2014 Share Posted June 10, 2014 Scale and rotation are in the 3*3 matrix, position must be stored in the 4th line (for row-major order matrix such in babylon.js) or in the 4th column (for column-major order matrix). More about row-major and column-major order: http://en.wikipedia.org/wiki/Row-major_order 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.