From 313b77be791b1fe6836b8cb5d77baf1f03b77be0 Mon Sep 17 00:00:00 2001 From: Johannes Kirschbauer Date: Wed, 3 Sep 2025 21:57:27 +0200 Subject: [PATCH] ui/move: fix bug, with interleaving positions --- pkgs/clan-app/ui/src/scene/cubes.tsx | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/pkgs/clan-app/ui/src/scene/cubes.tsx b/pkgs/clan-app/ui/src/scene/cubes.tsx index c6b822059..1dd1cfedf 100644 --- a/pkgs/clan-app/ui/src/scene/cubes.tsx +++ b/pkgs/clan-app/ui/src/scene/cubes.tsx @@ -602,10 +602,11 @@ export function CubeScene(props: { if (ctx.worldMode() === "move") { // Set machine as not flying - props.setMachinePos( - highlightGroups["move"].values().next().value!, - cursorPosition() || null, - ); + const pos = actionMachine!.position.toArray(); + props.setMachinePos(highlightGroups["move"].values().next().value!, [ + pos[0], // x + pos[2], // z + ]); clearHighlight("move"); ctx.setWorldMode("select"); renderLoop.requestRender();