fix(miku): correct scale + animation playback

- Fixed Blender export: remove FBX armature modifier before scaling,
  then transform_apply(scale=True) before creating new armature
- Model now exports at correct 1.8 unit height (verified in Blender)
- SkinnedPlayerModel now polls MovementStateMachine in _process
  to drive animations based on movement state
- Player 1 gets Miku at origin, others get procedural humanoid at y=-0.9
This commit is contained in:
2026-06-22 18:15:03 -04:00
parent ae8231d31d
commit 92713a681a
5 changed files with 56 additions and 6 deletions
+3 -2
View File
@@ -370,14 +370,15 @@ func _spawn_player(pid: int) -> CharacterBody3D:
player.set_script(mover_script)
# Visual Model for Player
# Player 1 gets the Miku skinned model, others get procedural humanoid
if pid == 1:
# 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.position = Vector3(0, -0.9, 0)
skinned.position = Vector3.ZERO # Model origin = player origin
player.add_child(skinned)
else:
# Default: procedural humanoid
var humanoid = load("res://characters/humanoid_model.gd").new()
humanoid.name = "HumanoidModel"
humanoid.color = Color(0.2, 0.4, 0.8)