How to move and rotate gltf model?

Hello.

I want to move and rotate the gltf model.

However, if I move the model first and then rotate it, it does not rotate around the center of model.
I think, the model rotates around the center before it moves.

How can I rotate the gltf model on the center after it moved?

my code is

loader.load(url, (gltf) => {
    const model = gltf.scene;
    ...
    model.position.setX(x);
    model.position.setY(y);
    model.position.setZ(z);
    
    ...
});

...
    model.rotation.z += 0.01;
...

thanks.

I found this in the forum

3 Likes