From 45f3e9514d0842bb215f755da1b222286d9fa2df Mon Sep 17 00:00:00 2001 From: MaddoScientisto Date: Thu, 25 Dec 2025 19:49:33 +0100 Subject: [PATCH] Changed default camera rotation to 36 degrees --- IsoTest/Factory4.tscn | 3 +-- Scripts/Misc/CameraController3D.cs | 8 +++++--- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/IsoTest/Factory4.tscn b/IsoTest/Factory4.tscn index cff3781d..233b8091 100644 --- a/IsoTest/Factory4.tscn +++ b/IsoTest/Factory4.tscn @@ -1724,12 +1724,11 @@ script = ExtResource("4_f1ieg") [node name="Camera3D" type="Camera3D" parent="."] physics_interpolation_mode = 1 -transform = Transform3D(0.7071068, -0.49999997, 0.50000006, 0, 0.7071069, 0.70710677, -0.7071068, -0.49999997, 0.50000006, -3.7983856, 7.935, 5.0604153) +transform = Transform3D(0.70710677, -0.4156269, 0.5720614, 0, 0.809017, 0.58778524, -0.70710677, -0.4156269, 0.5720614, -3.7983856, 7.935, 5.0604153) projection = 1 size = 8.0 script = ExtResource("5_unwtk") MaxAimOffsetDistance = 16.0 -CameraOffset = Vector3(8, 12, 8) TargetPath = NodePath("../CameraTarget") [node name="AudioStreamPlayer2D" parent="." instance=ExtResource("7_mtei5")] diff --git a/Scripts/Misc/CameraController3D.cs b/Scripts/Misc/CameraController3D.cs index 36ebc4d2..e5b9c42f 100644 --- a/Scripts/Misc/CameraController3D.cs +++ b/Scripts/Misc/CameraController3D.cs @@ -9,12 +9,14 @@ public partial class CameraController3D : Camera3D [Export] public bool EnableSmoothing = true; [Export] public bool FollowTargeting = true; + [Export] public Vector3 DefaultCameraRotation = new Vector3(-36f, 45f, 0f); + [Export] public float SmoothTime = 0.2f; [Export] public float MaxAimOffsetDistance = 2.0f; [Export] public float AimLerpSpeed = 8.0f; [Export] public float AimDeadzone = 0.2f; - [Export] public Vector3 CameraOffset = new Vector3(0, 12, -12); // Relative to target + [Export] public Vector3 CameraOffset = new Vector3(8, 8.5f, 8); //new Vector3(0, 12, -12); // Relative to target [Export] public StringName AimUpName = "aim_up"; [Export] public StringName AimDownName = "aim_down"; @@ -26,12 +28,12 @@ public partial class CameraController3D : Camera3D private CameraTarget3D _target; private Vector3 _currentPosition = Vector3.Zero; private Vector3 _currentAimOffset = Vector3.Zero; - + public override void _Ready() { Instance = this; - RotationDegrees = new Vector3(-45f, 45f, 0f); + RotationDegrees = DefaultCameraRotation; Projection = ProjectionType.Orthogonal; _target = GetNode(TargetPath);