Hi,
I’m importing svg’s with SVGLoader.
I get a group that represent the imported image.
( a group of meshes).
How can I use applyMatrix4OnOrigin to set the transform origin to the center of the group?
I found out about that method after reading people discussing how to change pivot points.
I’m using this code with no results:
group.children.forEach(setPivot);
function setPivot(item)
{
let itemMatrix = item.matrix;
let itemOrigin = [ SVGheightHalf,SVGwidthHalf, 0 ];
item.applyMatrix4OnOrigin( itemMatrix, itemOrigin );
};
Thanks!
EDIT: I found my answer for centering objects in a group here: