From ee1e76dd0e53a0fa06e7f273bd1736ec447ea819 Mon Sep 17 00:00:00 2001 From: snoweuph Date: Wed, 1 Feb 2023 13:28:53 +0100 Subject: [PATCH] Improving Camera --- Scenes/Test Scene.tscn | 6 ++++++ project.godot | 9 ++++++++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/Scenes/Test Scene.tscn b/Scenes/Test Scene.tscn index 381d436..6c3e00c 100644 --- a/Scenes/Test Scene.tscn +++ b/Scenes/Test Scene.tscn @@ -18,6 +18,7 @@ layer_0/tile_data = PackedInt32Array(1114138, 262144, 1, 1048602, 0, 1, 983066, [node name="Player" type="CharacterBody2D" parent="."] script = ExtResource("2_gw00d") +speed = 100 [node name="Sprite2D" type="Sprite2D" parent="Player"] position = Vector2(149, 86) @@ -27,6 +28,11 @@ texture = ExtResource("2_0flm2") position = Vector2(149, 86) current = true zoom = Vector2(8, 8) +position_smoothing_enabled = true +drag_horizontal_enabled = true +drag_vertical_enabled = true +editor_draw_limits = true +editor_draw_drag_margin = true [node name="CollisionShape2D" type="CollisionShape2D" parent="Player"] position = Vector2(149, 86) diff --git a/project.godot b/project.godot index 2117cd1..92a789a 100644 --- a/project.godot +++ b/project.godot @@ -16,7 +16,9 @@ config/features=PackedStringArray("4.0") [display] -window/stretch/aspect="ignore" +window/stretch/mode="viewport" +window/stretch/aspect="expand" +window/stretch/scale=0.7 [editor] @@ -57,6 +59,11 @@ move_right={ , Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":4194321,"key_label":0,"unicode":0,"echo":false,"script":null) ] } +do_shake={ +"deadzone": 0.5, +"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":32,"key_label":0,"unicode":32,"echo":false,"script":null) +] +} [physics]