Clone doesn't work properly with some GLTF models

Hello there,

I’m trying to clone a model, and change its position and scale just after

But with some models it doen’t work, and with others it works

The problem is when i add my clone with changed position or scale in the scene, they just remain at their normal position/scale, my modification is not taken into account

Example :

const gltfloader = new GLTFLoader.GLTFLoader();
gltfloader.load("./models/player/amongus/scene.gltf", function(gltf) {
const model = gltf.scene;

const clone = model.clone();

clone.position.set(55, 5, -40.87);
clone.scale.set(1, 1, 1);



With the model found here : Among Us character - Download Free 3D model by Yury Misiyuk (@Tim0) [0a7369a] - Sketchfab, it doesn’t work, but with this one it works Harry Potter - Download Free 3D model by Matthew Tew (@matt1279797) [9e546d0] - Sketchfab

Someone has experienced the same thing, and know whats going on ?

Thank you



Have you tried SkeletonUtils.clone? Normal clone does not work with models with skeletons.

1 Like

Ohh, no, i’ll try tomorrow

Thank you sir !

Okay, so it definitively fixed the issue

For the one who’s wondering, you juste have to use the script like this

import * as SkeletonUtils from ‘three/addons/utils/SkeletonUtils.js’;

let clone = SkeletonUtils.clone(model)

Thank you

1 Like