fix: create proper Idle animation in Godot when GLB export loses tracks

The Blender GLTF exporter was stripping animation tracks (only 1 of 51
channels survived export). Now SkinnedPlayerModel detects this at
runtime and creates a proper Idle animation programmatically using Godot's
Animation API with 5 bone tracks (Spine, Arms, Neck, Hips).

Also switched model_path back to miku_rigged_final.glb since the
re-export wasn't adding usable animations.
This commit is contained in:
2026-06-23 18:55:12 -04:00
parent 0b0497e128
commit 39063bfe9e
5 changed files with 275 additions and 202 deletions
+1 -1
View File
@@ -432,7 +432,7 @@ func _spawn_player(pid: int) -> CharacterBody3D:
# Miku: use the rigged GLB model with its own armature
var skinned = load("res://characters/skinned_player_model.gd").new()
skinned.name = "SkinnedModel"
skinned.model_path = "res://assets/characters/skins/miku_rigged_animated.glb"
skinned.model_path = "res://assets/characters/skins/miku_rigged_final.glb"
skinned.scale_factor = 1.0 # Already scaled to 1.8m in Blender
skinned.position = Vector3.ZERO # Model origin = player origin
player.add_child(skinned)