fix: use animated GLB with all locomotion animations and fix scaling
The skinned player model was loading miku_rigged_final.glb which only contained a single "Idle" animation (1 track, near-rest pose). This caused "animation 'Jump/Walk/Run' not found" spam and a T-pose appearance. Switch to miku_rigged_animated.glb which has all 7 animations (Crouch, Death, Idle, Idle2, Jump, Run, Walk). Additional fixes: - Fix scaling: the GLB is already in meters (~1.6m tall), not cm. Removed the unconditional 0.01 cm->m conversion that was shrinking the character to 1/100th size. - Fix bone track paths: use "MikuRig/Skeleton3D:" prefix matching the actual scene tree structure (AnimationPlayer is sibling of MikuRig). - Add _ensure_locomotion_animations() to create Walk/Run/Jump/Idle procedurally if the GLB is missing them. - Eliminate per-frame "not found" log spam with rate-limited warnings. - Update level_runtime.gd and test_level_builder.gd to use animated GLB. Closes #3d-player-model animation pipeline
This commit is contained in:
@@ -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_final.glb"
|
||||
skinned.model_path = "res://assets/characters/skins/miku_rigged_animated.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)
|
||||
|
||||
Reference in New Issue
Block a user