mirror of
https://github.com/JannisX11/blockbench.git
synced 2024-11-27 04:21:46 +08:00
Fix issue moving groups in local space
This commit is contained in:
parent
2df0b1f397
commit
eb3c3c9c2e
@ -874,7 +874,7 @@
|
||||
let space = Transformer.getTransformSpace();
|
||||
//Rotation
|
||||
if (space === 2 || Toolbox.selected.id == 'resize_tool') {
|
||||
Transformer.rotation_ref = selected[0] && selected[0].mesh;
|
||||
Transformer.rotation_ref = Group.selected ? Group.selected.mesh : (selected[0] && selected[0].mesh);
|
||||
if (Toolbox.selected.id == 'rotate_tool' && Group.selected) {
|
||||
Transformer.rotation_ref = Group.selected.mesh;
|
||||
}
|
||||
|
@ -580,9 +580,7 @@ function moveElementsInSpace(difference, axis) {
|
||||
group_m = new THREE.Vector3();
|
||||
group_m[getAxisLetter(axis)] = difference;
|
||||
|
||||
var rotation = new THREE.Quaternion();
|
||||
group.mesh.getWorldQuaternion(rotation);
|
||||
group_m.applyQuaternion(rotation);
|
||||
group_m.applyQuaternion(group.mesh.quaternion);
|
||||
|
||||
group.forEachChild(g => {
|
||||
g.origin.V3_add(group_m.x, group_m.y, group_m.z);
|
||||
|
Loading…
Reference in New Issue
Block a user