Hello,
I got another error which I really don’t understand and I after update again :
initializeTransformControl(obj) {
// @ts-ignore
this.controls = new TransformControls(
// @ts-ignore
this.context.mainCamera,
this.context.renderer.domElement
);
this.controls.space = "local";
this.controls.attach(obj);
this.context.scene.add(this.controls);
console.log(this.controls)
this.controls.matrixAutoUpdate = false
this.controls.matrix.copy(this.controls.object.matrix)
// Ecouteurs d'événements pour les modifications
this.controls.addEventListener("dragging-changed", (event) =>
this.handleDraggingChanged(event)
);
const planesToRemove: any = [];
// Ajouter ces lignes pour masquer les plans de transformation
this.controls.traverse((child: any) => {
if (["XY", "XZ", "YZ", "XYZ"].includes(child.name)) {
planesToRemove.push(child);
}
});
planesToRemove.forEach((plane: any) => {
plane.parent.remove(plane);
});
}
I don’t know why but now, my Transform control (three js one) work but doesn’t follow the mesh now
It’s locked to the origin of my scene, and it wasn’t the case before.
I verify the matrixAutoUpdate, etc but I don’t understand why it doesn’t move.
by user 224464722878005248