From 72fbc4bc9c82b469fbe89a35badbaa20d926315c Mon Sep 17 00:00:00 2001 From: syuilo <4439005+syuilo@users.noreply.github.com> Date: Tue, 28 Apr 2026 09:00:10 +0900 Subject: [PATCH] Update engine.ts --- packages/frontend/src/world/room/engine.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/frontend/src/world/room/engine.ts b/packages/frontend/src/world/room/engine.ts index affd9a46f6..1fffd30577 100644 --- a/packages/frontend/src/world/room/engine.ts +++ b/packages/frontend/src/world/room/engine.ts @@ -1241,6 +1241,9 @@ export class RoomEngine extends EventEmitter { const selectedObject = this.selected.objectEntity.rootMesh; this.clearHighlight(); + const initialPosition = selectedObject.position.clone(); + const initialRotation = selectedObject.rotation.clone(); + // 子から先に適用していく const setStickyParentRecursively = (mesh: BABYLON.AbstractMesh) => { const stickyObjectIds = Array.from(this.roomState.installedObjects.filter(o => o.sticky === mesh.metadata.objectId)).map(o => o.id); @@ -1278,9 +1281,6 @@ export class RoomEngine extends EventEmitter { const dir = this.camera.getDirection(BABYLON.Axis.Z).scale(this.scene.useRightHandedSystem ? -1 : 1); - const initialPosition = selectedObject.position.clone(); - const initialRotation = selectedObject.rotation.clone(); - let sticky: string | null; this.grabbingCtx = {