Quellcode durchsuchen

Fix issue with quicksaving camera after scene load

Quick saving camera transform with Q + S after loading a scene and then
quick loading the camera transform with Q + A results in an unexpected
camera rotation

MM uses the camera's AroundAngle to save its rotation when quick saving
the camera's transform but uses euler angles when saving the scene. On
scene load, the camera's rotation is set through the euler angles but
not the AroundAngle.
habeebweeb vor 4 Jahren
Ursprung
Commit
e3057af99c
1 geänderte Dateien mit 2 neuen und 2 gelöschten Zeilen
  1. 2 2
      MultipleMaids/CM3D2/MultipleMaids/Plugin/MultipleMaids.Update.cs

+ 2 - 2
MultipleMaids/CM3D2/MultipleMaids/Plugin/MultipleMaids.Update.cs

@@ -3469,8 +3469,8 @@ namespace CM3D2.MultipleMaids.Plugin
                                                             float.Parse(strArray3[29])),
                                                 true);
                         mainCamera.SetDistance(float.Parse(strArray3[30]), true);
-                        mainCamera.transform.eulerAngles =
-                                new Vector3(float.Parse(strArray3[31]), float.Parse(strArray3[32]), float.Parse(strArray3[33]));
+                        // strArray3[33] is not used
+                        mainCamera.SetAroundAngle(new Vector2(float.Parse(strArray3[32]), float.Parse(strArray3[31])), true);
                         if (int.Parse(strArray3[34]) == 1)
                         {
                             inName = strArray3[35];