人生啊人生 1 月之前
父節點
當前提交
decc8778ec

+ 11 - 4
src/components/ThreeWorldEventQingXiCheAndQv/event/store/QingXiCheAndQvProcessEventStore.js

@@ -31,6 +31,12 @@ export const QingXiCheAndQvProcessEventStore = defineStore('QingXiCheAndQvProces
                 "name" : "行至车辆区域",
                 "name" : "行至车辆区域",
             },
             },
 
 
+            // 因为需求,该流程放到这里
+            {
+                "note" : "在施工范围放置警示标识(请点击地面触发)",
+                "name" : "在施工范围放置警示标识",
+            },
+
             {
             {
                 "note" : "打开车门进入驾驶室",
                 "note" : "打开车门进入驾驶室",
                 "name" : "打开车门进入驾驶室",
                 "name" : "打开车门进入驾驶室",
@@ -66,10 +72,11 @@ export const QingXiCheAndQvProcessEventStore = defineStore('QingXiCheAndQvProces
                 "name" : "下车确定安全灯显示是否正常",
                 "name" : "下车确定安全灯显示是否正常",
             },
             },
 
 
-            {
-                "note" : "在施工范围放置警示标识(请点击地面触发)",
-                "name" : "在施工范围放置警示标识",
-            },
+            // // 因为需求,该流程放到其他地方
+            // {
+            //     "note" : "在施工范围放置警示标识(请点击地面触发)",
+            //     "name" : "在施工范围放置警示标识",
+            // },
 
 
             {
             {
                 "note" : "从水管固定座上拧下高压水管",
                 "note" : "从水管固定座上拧下高压水管",

+ 9 - 3
src/components/ThreeWorldEventQingXiCheAndQv/js/QingXiCheAndQvCarEventClick.js

@@ -384,12 +384,18 @@ export class QingXiCheAndQvCarEventClick {
 
 
         switch (type) {
         switch (type) {
 
 
-            case ' 行至车辆区域':
-
-
+            case '行至车辆区域':
 
 
+                let roleAndPositionTargetBool = objThreeWorldEventMain.roleAndPositionTargetBool();
+                if (roleAndPositionTargetBool == true) {
 
 
+                    QingXiCheAndQvCarEvent.find().eventEnd = 2;
+                    QingXiCheAndQvCarEvent.find().tipsBtnsUpOpenEventCallbackMain(false);
+                    QingXiCheAndQvCarEvent.find().tipsBtnsDownOpenEventCallbackMain(true);
+                    thisClass.renderEventBool = false;
 
 
+                }
+                
                 break;
                 break;
 
 
         }
         }

+ 19 - 0
src/components/ThreeWorldEventQingXiCheAndQv/js/QingXiCheAndQvThreeWorldEventMain.js

@@ -108,6 +108,7 @@ export class QingXiCheAndQvThreeWorldEventMain {
 
 
     /**
     /**
      * 将当前移动的视角,切换成角色所在视角
      * 将当前移动的视角,切换成角色所在视角
+     * 
      */
      */
     coordinateMoveSphereFollowUpdate = function() {
     coordinateMoveSphereFollowUpdate = function() {
         
         
@@ -265,8 +266,26 @@ export class QingXiCheAndQvThreeWorldEventMain {
 
 
         var absolutePosition = ChengGuangYuanJing.Role.find().objRole._absolutePosition;
         var absolutePosition = ChengGuangYuanJing.Role.find().objRole._absolutePosition;
 
 
+        var positionTarget = {
+            'x' : 7.16298,
+            'y' : 1.01,
+            'z' : -12.90319,
+        }
+
+        // 得到两点之间的距离
+        let thisVector3distanceTo = BABYLON.Vector3.Distance(
+            new BABYLON.Vector3(parseFloat(absolutePosition.x), parseFloat(absolutePosition.y), parseFloat(absolutePosition.z)),
+            new BABYLON.Vector3(parseFloat(positionTarget.x), parseFloat(positionTarget.y), parseFloat(positionTarget.z))
+        );
+
+        // console.log('roleAndPositionTargetBool ---', thisVector3distanceTo);
         
         
+
+        if (thisVector3distanceTo <= 5) {
+            return true;
+        }
         
         
+        return false;
 
 
     }
     }