Currently, I am working on a threejs scene where there are multiple objects. The issue arises when I select more than one object and move them across the screen - all selected objects end up in the same position as Object 1. However, it is crucial for them to maintain their individual positions. Below is a snippet of the code in question:
translateObjectTo(absX, absY, absZ) {
this.selectedObjects.forEach((selection) => {
if (absX !== null) {
selection.translateX(absX - selection.position.x);
}
...
});
}
Changing the line to selection.translateX(absX);
does make it work, but with an incorrect value.