I'm attempting to swap out an object3D
for a character
model, while retaining all of its attributes like the position.
var object = new THREE.Object3D( );
object = models.character[0].clone( );
object.position.set( 100, 230, 15 );
scene.add( object.scene );
const clip = THREE.AnimationClip.findByName( object.animations, 'idle' );
var action = mixer.clipAction( clip );
action.play();
//...later on, replace the model, keeping its original position
object = models.character[1].clone( );
What is the best method to switch the model of a THREE.Object3D( )
?