Feat/14 movement overhaul #20
@@ -40,8 +40,9 @@ static func load(glb_path: String) -> Node3D:
|
||||
print(" Animations: %d" % gltf.get_animation_count())
|
||||
print(" Meshes: %d" % gltf.get_mesh_count())
|
||||
|
||||
# Generate scene
|
||||
var scene = gltf.generate_scene(state)
|
||||
# Generate scene — remove_immutable_tracks=false preserves all bone
|
||||
# animation tracks (default true strips tracks where rest==pose → T-pose).
|
||||
var scene = gltf.generate_scene(state, 30, false, false)
|
||||
if not scene:
|
||||
print("GLBLoader: failed to generate scene")
|
||||
return null
|
||||
|
||||
@@ -52,7 +52,11 @@ func load_model(path: String) -> void:
|
||||
return
|
||||
|
||||
print("SkinnedPlayerModel: parsed GLB, generating scene...")
|
||||
var scene = gltf.generate_scene(state)
|
||||
# remove_immutable_tracks=false is CRITICAL — when true (default), Godot
|
||||
# strips animation tracks whose values equal the rest pose. This causes
|
||||
# partial T-pose because some bones only move in certain animations.
|
||||
# Editor import sets this to false; runtime loading does not.
|
||||
var scene = gltf.generate_scene(state, 30, false, false)
|
||||
if not scene:
|
||||
print("SkinnedPlayerModel: failed to generate scene")
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user