|
@@ -342,29 +342,29 @@ export class QingXiCheAndQvThreeWorldEventMain {
|
|
|
|
|
|
var absolutePosition = ChengGuangYuanJing.Role.find().objRole._absolutePosition;
|
|
|
|
|
|
- // var positionTarget = {
|
|
|
- // 'x' : 8.27173,
|
|
|
- // 'y' : 1.01,
|
|
|
- // 'z' : -17.70557,
|
|
|
- // }
|
|
|
-
|
|
|
- // // 得到两点之间的距离
|
|
|
- // 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 <= 9) {
|
|
|
- // return true;
|
|
|
- // }
|
|
|
-
|
|
|
for (let key in QingXiCheAndQvCarEvent.find().aroundTheCarPoint) {
|
|
|
|
|
|
let objAroundTheCarPoint = QingXiCheAndQvCarEvent.find().aroundTheCarPoint[key];
|
|
|
- console.log("objAroundTheCarPoint", objAroundTheCarPoint);
|
|
|
+ // console.log("objAroundTheCarPoint", objAroundTheCarPoint);
|
|
|
+
|
|
|
+ var positionTarget = {
|
|
|
+ 'x' : objAroundTheCarPoint["positionX"],
|
|
|
+ 'y' : objAroundTheCarPoint["positionY"],
|
|
|
+ 'z' : objAroundTheCarPoint["positionZ"],
|
|
|
+ }
|
|
|
+
|
|
|
+ // 得到两点之间的距离
|
|
|
+ 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('aroundTheCarPointBool ---', key, thisVector3distanceTo);
|
|
|
+
|
|
|
+ // if (thisVector3distanceTo <= 9) {
|
|
|
+ // return true;
|
|
|
+ // }
|
|
|
+
|
|
|
}
|
|
|
|
|
|
return false;
|