From d41e1236ab68c9dce2e66e1f7ef1182c9424d17f Mon Sep 17 00:00:00 2001
From: luxiaotao1123 <t1341870251@163.com>
Date: 星期日, 05 五月 2024 16:11:32 +0800
Subject: [PATCH] #

---
 src/components/agv.jsx |   19 +++++++++++++++----
 1 files changed, 15 insertions(+), 4 deletions(-)

diff --git a/src/components/agv.jsx b/src/components/agv.jsx
index e63648d..7b4e13f 100644
--- a/src/components/agv.jsx
+++ b/src/components/agv.jsx
@@ -5,7 +5,13 @@
 import Box from './box';
 import * as Common from '../utils/common';
 import * as TWEEN from "@tweenjs/tween.js";
-import { INTERVAL_TIME, MODEL_AGV_SCALE } from '@/config/setting'
+import {
+    INTERVAL_TIME,
+    MODEL_AGV_SCALE,
+    REAL_COMPARE_MAP_SCALE,
+    REAL_COMPARE_MAP_OFFSET_X,
+    REAL_COMPARE_MAP_OFFSET_Z,
+} from '../config/setting'
 
 const Agv = (props) => {
     const { agvNo, position, theta, height, loaderTheta, forkLength, trayList, hasBox } = props;
@@ -22,10 +28,15 @@
         }
 
         // group position
+        // const pos = {
+        //     x: position?.[0],
+        //     y: position?.[1],
+        //     z: position?.[2],
+        // }
         const pos = {
-            x: position?.[0],
-            y: position?.[1],
-            z: position?.[2],
+            x: position?.[0] * REAL_COMPARE_MAP_SCALE + REAL_COMPARE_MAP_OFFSET_X,
+            y: position?.[1] * REAL_COMPARE_MAP_SCALE,
+            z: position?.[2] * REAL_COMPARE_MAP_SCALE + REAL_COMPARE_MAP_OFFSET_Z,
         }
         if (!Common.deepEqual(groupPos, pos)) {
             new TWEEN.Tween(groupPos)

--
Gitblit v1.9.1