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:
@@ -0,0 +1,33 @@
|
||||
@tool
|
||||
extends EditorScript
|
||||
|
||||
func _run():
|
||||
var source = "res://assets/characters/skins/miku_rigged_final.glb"
|
||||
var dest = "res://assets/characters/skins/miku_rigged_imported.tscn"
|
||||
|
||||
print("Loading %s..." % source)
|
||||
var glb = load(source)
|
||||
if not glb:
|
||||
print("ERROR: Failed to load GLB")
|
||||
return
|
||||
|
||||
print("Instantiating...")
|
||||
var scene = glb.instantiate()
|
||||
if not scene:
|
||||
print("ERROR: Failed to instantiate")
|
||||
return
|
||||
|
||||
print("Scene: %s" % scene.name)
|
||||
print("Children:")
|
||||
for child in scene.get_children():
|
||||
print(" %s (%s)" % [child.name, child.get_class()])
|
||||
if child is Skeleton3D:
|
||||
print(" Bones: %d" % child.get_bone_count())
|
||||
if child is AnimationPlayer:
|
||||
print(" Animations: %s" % child.get_animation_list())
|
||||
|
||||
# Save as scene
|
||||
var packed = PackedScene.new()
|
||||
packed.pack(scene)
|
||||
ResourceSaver.save(packed, dest)
|
||||
print("Saved to %s" % dest)
|
||||
Reference in New Issue
Block a user