From 48a992e07a1967b6e6ad66b27793e84705a3df11 Mon Sep 17 00:00:00 2001 From: Dmitrii Bykov Date: Sun, 24 May 2026 19:16:49 +0300 Subject: [PATCH] =?UTF-8?q?fix=20=D0=BC=D1=8B=D1=88=D1=8C=20+=20=D0=BB?= =?UTF-8?q?=D0=B8=D1=86=D0=BE=20=D0=BE=D1=82=D1=86=D0=B0=20(=D0=B3=D0=BB?= =?UTF-8?q?=D0=B0=D0=B7=D0=B0,=20=D0=BD=D0=BE=D1=81,=20=D1=80=D0=BE=D1=82,?= =?UTF-8?q?=20=D0=B1=D1=80=D0=BE=D0=B2=D0=B8,=20=D1=89=D0=B5=D1=82=D0=B8?= =?UTF-8?q?=D0=BD=D0=B0,=20=D1=83=D1=88=D0=B8)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit МЫШЬ КАМЕРА (главный баг): - Crosshair Control в центре экрана с дефолтным mouse_filter=STOP ЖРАЛ ВСЕ mouse_motion events когда курсор был в центре (а он всегда в центре при MOUSE_MODE_CAPTURED). FPV._unhandled_input не вызывался → камера не вращалась. - Поставил mouse_filter=2 (IGNORE) на Crosshair, CenterDot, OuterRing, InnerHole — теперь они только рендерятся, события пролетают мимо. - Поставил mouse_filter=2 ТАКЖЕ на все HUD-лейблы (DateTime, Objective, Money, Weather, Stats, ControlsHint, PromptLabel) и SubtitlePanel — на будущее, чтобы курсор поверх них не обламывал камеру. СЛАЙДЕРЫ В НАСТРОЙКАХ: - HBoxContainer rows с custom_minimum_size (0, 24). - Labels: size_flags_vertical=4 (SHRINK_CENTER) + vertical_alignment=1 (CENTER) + min_size (W, 24). - Sliders: size_flags_vertical=4 + min_size (140, 24). - Все элементы строки выровнены по центру по вертикали — слайдер и текст теперь на одной линии, хитбокс совпадает с визуалом. ЛИЦО ОТЦА: - Голова была просто кубом скин-цвета. Теперь у отца: * 2 глаза (белая склера 0.038×0.025×0.005 + тёмный зрачок 0.018×0.018×0.005 поверх) — реально видно куда смотрит. * Брови 0.045×0.012 материалом mat_hair (тёмные). * Нос 0.028×0.05×0.035 — выпирает на 0.012м вперёд от лица. * Рот 0.065×0.012 тёмно-красным mat_mouth. * Щетина 0.2×0.075 на нижней части лица mat_stubble (тёмно-серо-коричневый) — мужик не побрился. * 2 уха 0.025×0.045×0.025 по бокам головы. - Все элементы — children FatherNPC/Head, наследуют поворот родителя, остаются на лице при walking-animation. Co-Authored-By: Claude Opus 4.7 (1M context) --- scenes/components/dialog_ui.tscn | 20 ++++++- scenes/components/pause_menu.tscn | 30 ++++++++-- scenes/prologue/act1_room.tscn | 94 ++++++++++++++++++++++++++++++- scripts/ui/pause_menu.gd.uid | 1 + 4 files changed, 135 insertions(+), 10 deletions(-) create mode 100644 scripts/ui/pause_menu.gd.uid diff --git a/scenes/components/dialog_ui.tscn b/scenes/components/dialog_ui.tscn index b741147..5e6aa2d 100644 --- a/scenes/components/dialog_ui.tscn +++ b/scenes/components/dialog_ui.tscn @@ -11,6 +11,7 @@ offset_left = 8.0 offset_top = 6.0 offset_right = 280.0 offset_bottom = 22.0 +mouse_filter = 2 text = "" modulate = Color(0.92, 0.92, 0.92, 1) @@ -19,6 +20,7 @@ offset_left = 340.0 offset_top = 6.0 offset_right = 632.0 offset_bottom = 22.0 +mouse_filter = 2 text = "" horizontal_alignment = 2 modulate = Color(0.94, 0.71, 0.1, 1) @@ -28,6 +30,7 @@ offset_left = 340.0 offset_top = 24.0 offset_right = 632.0 offset_bottom = 40.0 +mouse_filter = 2 text = "" horizontal_alignment = 2 modulate = Color(0.75, 0.75, 0.75, 1) @@ -37,6 +40,7 @@ offset_left = 340.0 offset_top = 215.0 offset_right = 632.0 offset_bottom = 231.0 +mouse_filter = 2 text = "" horizontal_alignment = 2 modulate = Color(0.7, 0.75, 0.85, 1) @@ -46,6 +50,7 @@ offset_left = 8.0 offset_top = 215.0 offset_right = 300.0 offset_bottom = 231.0 +mouse_filter = 2 text = "" modulate = Color(0.94, 0.71, 0.1, 1) @@ -54,7 +59,8 @@ offset_left = 0.0 offset_top = 28.0 offset_right = 640.0 offset_bottom = 42.0 -text = "WASD ходить · мышь смотреть · ЛКМ взаимодействие · ESC мышь · Q выход" +mouse_filter = 2 +text = "WASD ходить · мышь смотреть · ЛКМ взаимодействие · ESC меню · Q сохранить и выйти" horizontal_alignment = 1 modulate = Color(0.45, 0.45, 0.45, 0.8) @@ -63,12 +69,14 @@ offset_left = 316.0 offset_top = 176.0 offset_right = 324.0 offset_bottom = 184.0 +mouse_filter = 2 [node name="CenterDot" type="ColorRect" parent="Crosshair"] offset_left = 3.0 offset_top = 3.0 offset_right = 5.0 offset_bottom = 5.0 +mouse_filter = 2 color = Color(1, 1, 1, 0.85) [node name="OuterRing" type="ColorRect" parent="Crosshair"] @@ -76,22 +84,23 @@ offset_left = 0.0 offset_top = 0.0 offset_right = 8.0 offset_bottom = 8.0 -color = Color(0, 0, 0, 0.4) mouse_filter = 2 +color = Color(0, 0, 0, 0.4) [node name="InnerHole" type="ColorRect" parent="Crosshair"] offset_left = 1.0 offset_top = 1.0 offset_right = 7.0 offset_bottom = 7.0 -color = Color(0, 0, 0, 0) mouse_filter = 2 +color = Color(0, 0, 0, 0) [node name="PromptLabel" type="Label" parent="."] offset_left = 0.0 offset_top = 192.0 offset_right = 640.0 offset_bottom = 212.0 +mouse_filter = 2 text = "" horizontal_alignment = 1 modulate = Color(0.94, 0.71, 0.1, 1) @@ -101,18 +110,22 @@ offset_left = 16.0 offset_top = 240.0 offset_right = 624.0 offset_bottom = 354.0 +mouse_filter = 2 [node name="V" type="VBoxContainer" parent="SubtitlePanel"] layout_mode = 2 +mouse_filter = 2 [node name="Who" type="Label" parent="SubtitlePanel/V"] layout_mode = 2 +mouse_filter = 2 text = "[Я]" modulate = Color(0.94, 0.71, 0.1, 1) [node name="Text" type="RichTextLabel" parent="SubtitlePanel/V"] custom_minimum_size = Vector2(590, 60) layout_mode = 2 +mouse_filter = 2 bbcode_enabled = true text = "" fit_content = true @@ -121,6 +134,7 @@ autowrap_mode = 3 [node name="Hint" type="Label" parent="SubtitlePanel/V"] layout_mode = 2 +mouse_filter = 2 text = "ЛКМ или ПРОБЕЛ — дальше" horizontal_alignment = 2 modulate = Color(0.5, 0.5, 0.5, 1) diff --git a/scenes/components/pause_menu.tscn b/scenes/components/pause_menu.tscn index 7483612..1c7cdee 100644 --- a/scenes/components/pause_menu.tscn +++ b/scenes/components/pause_menu.tscn @@ -116,46 +116,64 @@ horizontal_alignment = 1 modulate = Color(0.94, 0.71, 0.1, 1) [node name="SensRow" type="HBoxContainer" parent="SettingsPanel/V"] +custom_minimum_size = Vector2(0, 24) layout_mode = 2 +theme_override_constants/separation = 8 [node name="Label" type="Label" parent="SettingsPanel/V/SensRow"] -custom_minimum_size = Vector2(150, 0) +custom_minimum_size = Vector2(150, 24) layout_mode = 2 +size_flags_vertical = 4 +mouse_filter = 2 text = "Чувствительность мыши" +vertical_alignment = 1 [node name="Slider" type="HSlider" parent="SettingsPanel/V/SensRow"] -custom_minimum_size = Vector2(140, 18) +custom_minimum_size = Vector2(140, 24) layout_mode = 2 +size_flags_vertical = 4 min_value = 1.0 max_value = 10.0 step = 0.1 value = 2.5 [node name="Value" type="Label" parent="SettingsPanel/V/SensRow"] -custom_minimum_size = Vector2(50, 0) +custom_minimum_size = Vector2(50, 24) layout_mode = 2 +size_flags_vertical = 4 +mouse_filter = 2 text = "0.0025" +vertical_alignment = 1 [node name="VolRow" type="HBoxContainer" parent="SettingsPanel/V"] +custom_minimum_size = Vector2(0, 24) layout_mode = 2 +theme_override_constants/separation = 8 [node name="Label" type="Label" parent="SettingsPanel/V/VolRow"] -custom_minimum_size = Vector2(150, 0) +custom_minimum_size = Vector2(150, 24) layout_mode = 2 +size_flags_vertical = 4 +mouse_filter = 2 text = "Громкость" +vertical_alignment = 1 [node name="Slider" type="HSlider" parent="SettingsPanel/V/VolRow"] -custom_minimum_size = Vector2(140, 18) +custom_minimum_size = Vector2(140, 24) layout_mode = 2 +size_flags_vertical = 4 min_value = 0.0 max_value = 100.0 step = 1.0 value = 50.0 [node name="Value" type="Label" parent="SettingsPanel/V/VolRow"] -custom_minimum_size = Vector2(50, 0) +custom_minimum_size = Vector2(50, 24) layout_mode = 2 +size_flags_vertical = 4 +mouse_filter = 2 text = "50%" +vertical_alignment = 1 [node name="Spacer2" type="Control" parent="SettingsPanel/V"] custom_minimum_size = Vector2(0, 10) diff --git a/scenes/prologue/act1_room.tscn b/scenes/prologue/act1_room.tscn index d0c6965..e56c008 100644 --- a/scenes/prologue/act1_room.tscn +++ b/scenes/prologue/act1_room.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=92 format=3] +[gd_scene load_steps=103 format=3] [ext_resource type="Script" path="res://scripts/prologue/act1.gd" id="1_act1"] [ext_resource type="Script" path="res://scripts/interactables/interactable.gd" id="2_int"] @@ -302,6 +302,43 @@ roughness = 0.95 albedo_color = Color(0.12, 0.12, 0.14, 1) roughness = 0.6 +[sub_resource type="BoxMesh" id="mesh_eye_white"] +size = Vector3(0.038, 0.025, 0.005) + +[sub_resource type="BoxMesh" id="mesh_pupil"] +size = Vector3(0.018, 0.018, 0.005) + +[sub_resource type="BoxMesh" id="mesh_eyebrow"] +size = Vector3(0.045, 0.012, 0.006) + +[sub_resource type="BoxMesh" id="mesh_nose"] +size = Vector3(0.028, 0.05, 0.035) + +[sub_resource type="BoxMesh" id="mesh_mouth"] +size = Vector3(0.065, 0.012, 0.005) + +[sub_resource type="BoxMesh" id="mesh_stubble"] +size = Vector3(0.2, 0.075, 0.004) + +[sub_resource type="BoxMesh" id="mesh_ear"] +size = Vector3(0.025, 0.045, 0.025) + +[sub_resource type="StandardMaterial3D" id="mat_eye_white"] +albedo_color = Color(0.95, 0.93, 0.88, 1) +roughness = 0.4 + +[sub_resource type="StandardMaterial3D" id="mat_pupil"] +albedo_color = Color(0.08, 0.1, 0.16, 1) +roughness = 0.3 + +[sub_resource type="StandardMaterial3D" id="mat_mouth"] +albedo_color = Color(0.4, 0.18, 0.16, 1) +roughness = 0.9 + +[sub_resource type="StandardMaterial3D" id="mat_stubble"] +albedo_color = Color(0.32, 0.24, 0.18, 1) +roughness = 0.95 + [node name="Act1Room" type="Node3D"] script = ExtResource("1_act1") @@ -625,6 +662,61 @@ transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.55, 0) mesh = SubResource("mesh_head") material_override = SubResource("mat_skin") +[node name="EyeWhiteL" type="MeshInstance3D" parent="FatherNPC/Head"] +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.058, 0.035, -0.132) +mesh = SubResource("mesh_eye_white") +material_override = SubResource("mat_eye_white") + +[node name="EyeWhiteR" type="MeshInstance3D" parent="FatherNPC/Head"] +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.058, 0.035, -0.132) +mesh = SubResource("mesh_eye_white") +material_override = SubResource("mat_eye_white") + +[node name="PupilL" type="MeshInstance3D" parent="FatherNPC/Head"] +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.058, 0.035, -0.135) +mesh = SubResource("mesh_pupil") +material_override = SubResource("mat_pupil") + +[node name="PupilR" type="MeshInstance3D" parent="FatherNPC/Head"] +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.058, 0.035, -0.135) +mesh = SubResource("mesh_pupil") +material_override = SubResource("mat_pupil") + +[node name="EyebrowL" type="MeshInstance3D" parent="FatherNPC/Head"] +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.058, 0.072, -0.132) +mesh = SubResource("mesh_eyebrow") +material_override = SubResource("mat_hair") + +[node name="EyebrowR" type="MeshInstance3D" parent="FatherNPC/Head"] +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.058, 0.072, -0.132) +mesh = SubResource("mesh_eyebrow") +material_override = SubResource("mat_hair") + +[node name="Nose" type="MeshInstance3D" parent="FatherNPC/Head"] +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -0.005, -0.142) +mesh = SubResource("mesh_nose") +material_override = SubResource("mat_skin") + +[node name="Mouth" type="MeshInstance3D" parent="FatherNPC/Head"] +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -0.07, -0.131) +mesh = SubResource("mesh_mouth") +material_override = SubResource("mat_mouth") + +[node name="Stubble" type="MeshInstance3D" parent="FatherNPC/Head"] +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -0.095, -0.131) +mesh = SubResource("mesh_stubble") +material_override = SubResource("mat_stubble") + +[node name="EarL" type="MeshInstance3D" parent="FatherNPC/Head"] +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.135, 0.005, 0) +mesh = SubResource("mesh_ear") +material_override = SubResource("mat_skin") + +[node name="EarR" type="MeshInstance3D" parent="FatherNPC/Head"] +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.135, 0.005, 0) +mesh = SubResource("mesh_ear") +material_override = SubResource("mat_skin") + [node name="Hair" type="MeshInstance3D" parent="FatherNPC"] transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.72, 0) mesh = SubResource("mesh_hair") diff --git a/scripts/ui/pause_menu.gd.uid b/scripts/ui/pause_menu.gd.uid new file mode 100644 index 0000000..8186363 --- /dev/null +++ b/scripts/ui/pause_menu.gd.uid @@ -0,0 +1 @@ +uid://2cogvakq3dtc