Fix mocap mode breaking on startup #753

Closed
opened 2026-04-05 22:02:25 +02:00 by MrUnknownDE · 0 comments
Owner

Originally created by @Stermere on 6/2/2024

extendedPelvisYawRoll in HumanSkeleton could sometimes return an invalid rotation quaternion on startup. With mocap mode disabled this value gets overwritten on the next iteration. However, when mocap mode is enabled the invalid rotation is used on calculations involved in setting the next head position causing NaNs to propagate to the head position.

This PR replaces the invalid rotation with the identity quaternion preventing this from occurring.

*Originally created by @Stermere on 6/2/2024* extendedPelvisYawRoll in HumanSkeleton could sometimes return an invalid rotation quaternion on startup. With mocap mode disabled this value gets overwritten on the next iteration. However, when mocap mode is enabled the invalid rotation is used on calculations involved in setting the next head position causing NaNs to propagate to the head position. This PR replaces the invalid rotation with the identity quaternion preventing this from occurring.
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github/SlimeVR-Server#753