This repository was archived by the owner on Aug 21, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 4
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Improve hand tracking through screen landmarks
Contributor
|
Belated approval |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
🤖 Generated by Copilot at aeccf4c
The pull request implements various improvements and refactors for the avatar, mocap, and XR features of the engine. It enhances the accuracy, performance, and flexibility of the avatar animation, footstep, and IK systems, and supports VRM models and lower body tracking for mocap. It also simplifies and organizes the code by removing unused or unnecessary imports, variables, and actions, and by using hookstate, action queues, state mutations, and entity UUIDs. It also fixes some errors and bugs related to the XR session and the avatar thumbnail.
References
closes #insert number here
Explanation
🤖 Generated by Copilot at aeccf4c
AvatarNetworkAction.setAvatarXrTrackingaction to synchronize the XR tracking state of an avatar entity with the network (link, link, link, link, link)setIkFootTargetfunction to make the footstep transition more precise and avoid jittering (link)AvatarIKTargetSystemto thespawnLocalAvatarInWorldandcreateIkTargetsForLocalAvatarfunctions inreceiveJoinWorld.tsto avoid unnecessary loops and queries and to centralize the logic for spawning the local avatar and its IK targets (link, link, link)ikDataByNameobject and added checks for the blend weight value before calling the IK solver in theAvatarAnimationSystem(link, link)executefunction of theAvatarAnimationSystemto theifblock that checks for themotionCaptureRigComponentor theXRRigComponentto avoid unnecessary calculations for non-XR or non-mocap avatars (link)newScreenlandmarksinstead of thelandmarksfor the wrist, pinky, and index positions in thesolveMotionCapturePosefunction (link)solveMotionCapturePosefunction to the beginning, before the check for thenewScreenlandmarks, to ensure that the head IK is always solved regardless of the hand landmarks availability (link)solvingLowerBodyflag and thehipRotationfrom theMotionCaptureRigComponentinstead of theMotionCaptureStateand added a fallback shoulder quaternion when the left and right hips are not visible in thesolveSpinefunction (link, link)onInit,hipRotation, andsolvingLowerBodyproperties to theMotionCaptureRigComponentdefinition and schema and set thesolvingLowerBodyflag to1in theuseEffecthook in the component (link, link, link)XRRigComponentto indicate that an entity has an XR rig and enable the IK calculations for the XR avatars in theAvatarAnimationSystem(link)$cacheproperty of theAvatarNetworkAction.setAvatarAnimationaction fromremovePrevious: truetoremovePrevious: falseto allow multiple animation actions to be applied to the same avatar entity without removing the previous ones (link)MotionCaptureRigComponentand commented it out with atodocomment to indicate that it causes issues with the IK solves (link)solveMotionCapturePosefunction and theAvatarAnimationSystemand commented it out with atodocomment to indicate that there are issues with the foot quaternions that need to be fixed (link, link)XRAction.sessionChangedaction when the XR session ends fromXRSessionFunctions.tsbecause it was not needed and caused errors when the session was already ended (link)getState(EngineState).deltaSecondswith a local variabledeltain thesetIkFootTargetfunction to improve performance (link)orthogonalVectorandshoulderPositionAlongPlanein thesolveMotionCapturePoseandsolveSpinefunctions with atodocomment to indicate that they are not used (link, link)avatarDetails.thumbnailResource.urlto use optional chaining inHeader/index.tsxto avoid errors when theavatarDetailsor thethumbnailResourceare undefined or null (link)🤖 Generated by Copilot at aeccf4c
QA Steps
List any additional steps required to QA the changes of this PR, as well as any supplemental images or videos.
Checklist