fix: use GLTFDocument to load GLB at runtime (no .import needed)
Godot headless/CLI can't import GLB files — the GLTF loader only works in the editor GUI. Switched SkinnedPlayerModel to use GLTFDocument.append_from_buffer() which parses GLB data from raw bytes at runtime. Verified: GLB parses successfully, generates scene with MikuRig skeleton, AnimationPlayer, and 7 animations (Crouch, Death, Idle, Idle_001, Jump, Run, Walk). Also added characters/glb_loader.gd as a reusable utility for loading any GLB file at runtime.
This commit is contained in:
@@ -436,6 +436,7 @@ func _spawn_player(pid: int) -> CharacterBody3D:
|
||||
skinned.scale_factor = 1.0 # Already scaled to 1.8m in Blender
|
||||
skinned.position = Vector3.ZERO # Model origin = player origin
|
||||
player.add_child(skinned)
|
||||
print("TestLevelBuilder: added SkinnedModel for player 1")
|
||||
else:
|
||||
# Default: procedural humanoid
|
||||
var humanoid = load("res://characters/humanoid_model.gd").new()
|
||||
|
||||
Reference in New Issue
Block a user