Skip to content

Conversation

@netpro2k
Copy link
Contributor

@netpro2k netpro2k commented Apr 21, 2022

This fixes #5373 , a regression caused by #5290.

This bug already existed but was being masked by matrix-auto-update. The root cause is the breaking of this rule from https://github.com/mozilla/hubs/blob/master/src/utils/threejs-world-update.js#L17

  • Do not set matrixIsModified yourself; You could accidentally overwrite a shared parent matrixWorld.

The hand poses ended up being applied to the identity matrix which breaks all sorts of things. This fixes the track-pose system so that this flag gets flipped properly. We should probably add a function to Object3D to make this less hacky. The actual side effect we want from this applyMatrix4 is to call _handleMatrixModification which handles flipping the matrixIsModified flag and correctly clearing the cached matrix. We could call this directly, but based on the name we sort of expect this to be an internal implementation detail. Will need to think more about what the right API is here.

@netpro2k netpro2k requested a review from takahirox April 21, 2022 19:30
Copy link
Contributor

@takahirox takahirox left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, it seems that we shouldn't directly set matrixIsModified. Thanks for the fix!

@netpro2k netpro2k merged commit 2225cc6 into master Apr 21, 2022
@netpro2k netpro2k deleted the fix-pose-tracking branch April 21, 2022 19:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Oculus Quest 2 tracking error

3 participants