Skip to content

Commit f06939e

Browse files
authored
Fix hand meshes popping in and out quickly as hand tracking is regained (#9736)
RiggedHandVisualizer is instantiated when hand tracking is regained. At that point, the HandRenderer is enabled and actually rendering, making the hand mesh visible - even if hand mesh visualization is disabled in MRTK scene settings. Afterwards, OnHandJointsUpdated is called in a subsequent frame, which will evaluate if the profile has hand mesh visualisation enabled, and disable it if not. This results in a bug where, if you had hand mesh visualization enabled, you see the hand mesh popping in at its original location, and then see it disappear again because it is being hidden. If you had hand mesh visualization enabled, you would also see this popping, because the location of the mesh wasn't updated until later. Disabling the hand mesh rendering on start (until we've been able to update its position, and evaluate if it needs to render at all) seems to fix this.
1 parent dfa25f0 commit f06939e

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

Assets/MRTK/SDK/Features/UX/Scripts/RiggedHandVisualizer/RiggedHandVisualizer.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,9 @@ private Quaternion Reorientation()
175175

176176
private void Start()
177177
{
178+
// Ensure hand is not visible until we can update position first time.
179+
HandRenderer.enabled = false;
180+
178181
// Initialize joint dictionary with their corresponding joint transforms
179182
joints[TrackedHandJoint.Wrist] = Wrist;
180183
joints[TrackedHandJoint.Palm] = Palm;

0 commit comments

Comments
 (0)