Ver Fonte

magnifyRate

woso_javan há 3 semanas atrás
pai
commit
a8bea42358

+ 4 - 1
assets/module_aliens/Script/LevelAction.ts

@@ -14,6 +14,7 @@ import { TimerMgr } from './Manager/TimerMgr';
 import { LevelManager } from './Manager/LevelMgr';
 import { CAMERA_SPLIT_DURATION } from './Components/BulletComponent';
 import { AliensAudioMgr } from './Manager/AliensAudioMgr';
+import { UserManager } from './Manager/UserMgr';
 
 const { ccclass, property } = _decorator;
 //动画时长
@@ -117,7 +118,9 @@ export class LevelAction extends Component {
         if (this._isZoomed) return;
 
         // 获取相机前方方向(世界坐标)
-        const forward = new Vec3(0, 0, -1);
+        const magnifyRate = UserManager.instance.userModel.magnifyRate;
+        console.log('magnifyRate:', magnifyRate);
+        const forward = new Vec3(0, 0, -magnifyRate);
         Vec3.transformQuat(forward, forward, this.camera.node.rotation);
         // 朝前方移动(拉近)
         Vec3.scaleAndAdd(this.camera.node.position, this._initialPosition, forward, this.zoomDistance);

+ 7 - 7
profiles/v2/packages/scene.json

@@ -1194,10 +1194,10 @@
         "z": 15.571198743943569
       },
       "rotation": {
-        "x": -0.13648187394068612,
-        "y": 0.13783536524042259,
-        "z": 0.019179915811493208,
-        "w": 0.9808191683503595
+        "x": -0.13648187394064326,
+        "y": 0.13783536524037923,
+        "z": 0.019179915811486956,
+        "w": 0.9808191683507036
       },
       "viewCenter": {
         "x": 380.5163127318326,
@@ -1214,9 +1214,9 @@
     },
     "19323c5d-5d36-438a-86ee-8288c690e5b0": {
       "position": {
-        "x": 34.695566602353,
-        "y": 34.695566602353,
-        "z": 34.69556660235299
+        "x": 34.38252137376476,
+        "y": 34.38252137376476,
+        "z": 34.38252137376476
       },
       "rotation": {
         "x": -0.27984814233312133,