fix: scale 1.4, idle-анимация против T-pose, character-male-d
Some checks failed
Godot CI / Import + smoke test (push) Failing after 29s
Some checks failed
Godot CI / Import + smoke test (push) Failing after 29s
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) <noreply@anthropic.com>
This commit is contained in:
parent
c825a716aa
commit
1453bf30a3
2 changed files with 23 additions and 2 deletions
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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 видим.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue