fix(skeleton): hide beard and skinned helmet pieces correctly #15

Merged
kanym merged 1 commit from fix-skeleton-head-parts-visibility into main 2026-08-06 12:13:28 +02:00
Collaborator

The hair/beard hide called into m_hairItemInstances/m_beardItemInstances
(plural), fields that don't exist on VisEquipment - every other race uses
the real singular m_hairItemInstance/m_beardItemInstance, so the beard was
never actually hidden. Fixed the field names and made the helper handle
both a GameObject and a List defensively.

Helmet hiding only scaled the wrapper to zero, which does nothing for a
skinned-mesh piece bound to the player's own bones - it ignores its
wrapper's transform. Added SkeletonVisuals.SetEquipmentPieceHidden, which
scales to zero and disables every child renderer, and used it everywhere
the helmet is hidden (local player, remote players, main-menu preview).

Also added an F8 debug dump of the hair/beard/helmet instance state
(active, renderer enabled, scale) for diagnosing any future visibility
regressions in-game.

Co-Authored-By: Claude Sonnet 5 noreply@anthropic.com

The hair/beard hide called into m_hairItemInstances/m_beardItemInstances (plural), fields that don't exist on VisEquipment - every other race uses the real singular m_hairItemInstance/m_beardItemInstance, so the beard was never actually hidden. Fixed the field names and made the helper handle both a GameObject and a List<GameObject> defensively. Helmet hiding only scaled the wrapper to zero, which does nothing for a skinned-mesh piece bound to the player's own bones - it ignores its wrapper's transform. Added SkeletonVisuals.SetEquipmentPieceHidden, which scales to zero and disables every child renderer, and used it everywhere the helmet is hidden (local player, remote players, main-menu preview). Also added an F8 debug dump of the hair/beard/helmet instance state (active, renderer enabled, scale) for diagnosing any future visibility regressions in-game. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
The hair/beard hide called into m_hairItemInstances/m_beardItemInstances
(plural), fields that don't exist on VisEquipment - every other race uses
the real singular m_hairItemInstance/m_beardItemInstance, so the beard was
never actually hidden. Fixed the field names and made the helper handle
both a GameObject and a List<GameObject> defensively.

Helmet hiding only scaled the wrapper to zero, which does nothing for a
skinned-mesh piece bound to the player's own bones - it ignores its
wrapper's transform. Added SkeletonVisuals.SetEquipmentPieceHidden, which
scales to zero and disables every child renderer, and used it everywhere
the helmet is hidden (local player, remote players, main-menu preview).

Also added an F8 debug dump of the hair/beard/helmet instance state
(active, renderer enabled, scale) for diagnosing any future visibility
regressions in-game.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
kanym merged commit 12e93d359a into main 2026-08-06 12:13:28 +02:00
kanym deleted branch fix-skeleton-head-parts-visibility 2026-08-06 12:13:36 +02:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
nandor/RacesOfValheim!15
No description provided.