fix: correct skin deformation and scale for GLB character models
The Miku model T-posed because the previous _update_skin() used set_bone_pose(i, get_bone_pose(i)) which is a no-op when the pose is unchanged. Replace with skeleton.notification(NOTIFICATION_UPDATE_SKELETON) to force the Skeleton3D to recompute bone transforms and notify the MeshInstance to update vertex buffers. Also fix scale: the GLB is ~1.2m tall (not 1.6m as documented), so set scale_factor=1.25 to fit the 1.8m player capsule, and add position_y_offset=-0.2 to align the model's feet with the player origin. Co-Authored-By: Hermes Agent <[email protected]>
This commit is contained in:
@@ -148,6 +148,8 @@ func _spawn_player(pid: int) -> CharacterBody3D:
|
||||
var skinned = load("res://characters/skinned_player_model.gd").new()
|
||||
skinned.name = "SkinnedModel"
|
||||
skinned.model_path = "res://assets/characters/skins/miku_rigged_animated.glb"
|
||||
skinned.scale_factor = 1.25
|
||||
skinned.position_y_offset = -0.2
|
||||
skinned.position = Vector3(0, 0.0, 0)
|
||||
skinned.first_person_mode = true
|
||||
player.add_child(skinned)
|
||||
|
||||
Reference in New Issue
Block a user