Hello everyone, it may be that I used three.js a lot before. I am not used to the transformation of babylon.
In three.js, I transform the matrix by applyMatrix4
, and the object rotates around its world center.
In pg, the world center of the box should be transformNode, but when I modify the world matrix of the box, it still rotates around its own center. Why is this happening?
If you rotate the parent transform node (CoT) then the child box will rotate around it like below for example… I’m not sure about the way you’re transforming the world matrix directly thou.
I can only call the rotation parent node to make the child node rotate around the parent node. Can’t I directly modify the world matrix of the child node to make the node rotate around the parent node?
AFAIK the world matrix is considered read only, so modifying it directly like that isn’t supported… I’m not for sure thou, others will be able to answer that part better.
I agree with @Blake the world matrix is read only. You can check this from the console in this PG
May I ask why you are so intent on using Matrices rather than rotation of the parent? Is it just what you are used to?
I hope to achieve all transformations through matrices, other projects also provide matrix data, now I have to decompose first, and then apply it to the parent node
For example, a box moves first, then rotates around a certain point, and then scales. Ideally, only a matrix can be achieved.
Easily done without matrices