ui/move: fix bug, with interleaving positions

This commit is contained in:
Johannes Kirschbauer
2025-09-03 21:57:27 +02:00
parent 49ff4da6be
commit 313b77be79

View File

@@ -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();