From 1453bf30a39b8845c116ac17ce64e9040636b4ae Mon Sep 17 00:00:00 2001 From: Dmitrii Bykov Date: Sun, 24 May 2026 20:29:38 +0300 Subject: [PATCH] =?UTF-8?q?fix:=20scale=201.4,=20idle-=D0=B0=D0=BD=D0=B8?= =?UTF-8?q?=D0=BC=D0=B0=D1=86=D0=B8=D1=8F=20=D0=BF=D1=80=D0=BE=D1=82=D0=B8?= =?UTF-8?q?=D0=B2=20T-pose,=20character-male-d?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit User: scale 2.0 был гигантским, T-pose рук в стороны = ужас. ФИКСЫ: 1. SCALE: 2.0 → 1.4. С базовой высотой mini-character ~0.85м → получится ~1.2м (как подросток-родитель, не великан 1.7м с запасом). Position x=1.4 → x=1.5 (чуть дальше от двери). 2. CHARACTER: male-a (очкарик-студент в зелёной футболке) → male-d. Лотерея в Kenney mini-characters — по именам разные стили: a=glasses, c=cop. Пробуем d. 3. T-POSE: Kenney glb имеют 32 анимации, но не играют ничего по умолчанию → модель в T-pose. Добавил _start_father_idle: - Находит AnimationPlayer внутри father - Перебирает анимации, ищет с «idle» в имени - Если нашёл — играет; иначе играет первую (fallback) - Print имя анимации в консоль для debug Co-Authored-By: Claude Opus 4.7 (1M context) --- scenes/prologue/act1_room.tscn | 4 ++-- scripts/prologue/act1.gd | 21 +++++++++++++++++++++ 2 files changed, 23 insertions(+), 2 deletions(-) diff --git a/scenes/prologue/act1_room.tscn b/scenes/prologue/act1_room.tscn index 032e87e..9434e8b 100644 --- a/scenes/prologue/act1_room.tscn +++ b/scenes/prologue/act1_room.tscn @@ -3,7 +3,7 @@ [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"] [ext_resource type="PackedScene" path="res://scenes/components/player_fpv.tscn" id="3_player"] -[ext_resource type="PackedScene" path="res://assets/models/characters/character-male-a.glb" id="100_father"] +[ext_resource type="PackedScene" path="res://assets/models/characters/character-male-d.glb" id="100_father"] [ext_resource type="PackedScene" path="res://assets/models/furniture/bedSingle.glb" id="101_bed"] [ext_resource type="PackedScene" path="res://assets/models/furniture/desk.glb" id="102_desk"] [ext_resource type="PackedScene" path="res://assets/models/furniture/chairDesk.glb" id="103_chair"] @@ -650,7 +650,7 @@ material_override = SubResource("mat_note") shape = SubResource("shape_note") [node name="FatherNPC" parent="." instance=ExtResource("100_father")] -transform = Transform3D(0, 0, -2, 0, 2, 0, 2, 0, 0, 1.4, 0, 0) +transform = Transform3D(0, 0, -1.4, 0, 1.4, 0, 1.4, 0, 0, 1.5, 0, 0) [node name="PlayerFPV" parent="." instance=ExtResource("3_player")] transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0.5) diff --git a/scripts/prologue/act1.gd b/scripts/prologue/act1.gd index 3aec7c4..b1f3026 100644 --- a/scripts/prologue/act1.gd +++ b/scripts/prologue/act1.gd @@ -15,6 +15,7 @@ var state: State = State.INTRO func _ready() -> void: _hide_noise_items() _apply_textures() + _start_father_idle() player.interactable_focused.connect(_on_player_focused) player.interactable_unfocused.connect(_on_player_unfocused) @@ -24,6 +25,26 @@ func _ready() -> void: DialogManager.set_controls_hint("WASD ходить · мышь смотреть · ЛКМ взаимодействие · ESC меню · Q сохранить и выйти") +func _start_father_idle() -> void: + # Kenney glb имеют 32 анимации, но не играют ничего по умолчанию → + # модель в T-pose (руки в стороны). Запускаем idle если есть. + var anim_player: AnimationPlayer = father.find_child("AnimationPlayer", true, false) as AnimationPlayer + if anim_player == null: + return + var anims: PackedStringArray = anim_player.get_animation_list() + if anims.size() == 0: + return + var idle_name: String = "" + for name in anims: + if "idle" in name.to_lower(): + idle_name = name + break + if idle_name == "": + idle_name = anims[0] + anim_player.play(idle_name) + print("[father] playing animation: ", idle_name, " (всего: ", anims.size(), ")") + + func _hide_noise_items() -> void: # Убираем только то что без модели выглядит как мусор. # Bookcase теперь Kenney модель — Shelf видим.