From 27bc13c7770e31cbf661b429b9c04accb3be7861 Mon Sep 17 00:00:00 2001 From: teatov Date: Sat, 5 Oct 2024 19:22:50 +1000 Subject: [PATCH] tweak camera values again --- scenes/world.tscn | 2 +- scripts/main_camera.gd | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/scenes/world.tscn b/scenes/world.tscn index 23ff32e..7e4baeb 100644 --- a/scenes/world.tscn +++ b/scenes/world.tscn @@ -44,7 +44,7 @@ shadow_enabled = true [node name="MainCamera" type="Camera3D" parent="."] transform = Transform3D(1, 0, 0, 0, 0.819152, 0.573576, 0, -0.573576, 0.819152, 0, 1, 2) current = true -far = 100.0 +far = 200.0 script = ExtResource("1_xl1ut") [node name="Units" type="Node" parent="."] diff --git a/scripts/main_camera.gd b/scripts/main_camera.gd index b870bc0..8347c49 100644 --- a/scripts/main_camera.gd +++ b/scripts/main_camera.gd @@ -1,6 +1,6 @@ extends Camera3D -const ZOOM_SPEED: float = 0.25 +const ZOOM_SPEED: float = 0.1 ## How many pixels the mouse needs to be away ## from the screen edge to move the camera. const EDGE_THRESHOLD: float = 10 @@ -11,14 +11,14 @@ const EDGE_THRESHOLD: float = 10 @export var zoom_in_speed: float = 5 @export var zoom_out_distance: float = 90 -@export var zoom_out_fov: float = 20 +@export var zoom_out_fov: float = 30 @export var zoom_out_angle: float = -0.25 * PI -@export var zoom_out_speed: float = 30 +@export var zoom_out_speed: float = 35 var target_position: Vector3 = Vector3(0, 0, 0) var mouse_position: Vector2 = Vector2() ## 0 = zoomed in. 1 = zoomed out. -var zoom_value: float = 0.25 +var zoom_value: float = 0.3 func _process(delta: float) -> void: handle_movement(delta)