Skip to content
This repository has been archived by the owner on Aug 21, 2024. It is now read-only.

Full Body IK #7458

Merged
merged 19 commits into from
Jan 25, 2023
Merged

Full Body IK #7458

merged 19 commits into from
Jan 25, 2023

Conversation

HexaField
Copy link
Member

@HexaField HexaField commented Jan 19, 2023

Summary

Full Body IK Implementation

  • pre-cache height & other necessary measurements based on bone structure in rig component upon avatar load
    • h: head to foot, a: head to hips, b: hips to knee, c: knee to feet
  • write a simple solver for the head/hip/knee/feet offsets
    • calculate internal angle (A) based on cosine rule
    • calculate opposite angle base on sine rule against right angle
    • get z, y from resulant triangle
  • do two bone solve from from hips to feet using knee as swing/twist
  • apply angle to hips to orient torso
  • rotate feet to make them flat to the ground
  • ensure translating & rotating the avatar does not break (only been using the developer test suite examples which have the test avatar at the original)
  • ensure existing arm and head look IK work as intended (may need to update matrices)
  • test with headsets & ensure networking works correctly

Other Fixes

  • debug helper & gizmo state fixes used in testing
  • improve spectate mode api

References

closes #7486

Checklist

  • If this PR is still a WIP, convert to a draft
  • ensure all checks pass
  • When this PR is ready, mark it as "Ready for review"
  • Changes have been manually QA'd
  • Changes reviewed by at least 2 approved reviewer

QA Steps

List any additional steps required to QA the changes of this PR, as well as any supplemental images or videos.

@HexaField HexaField requested a review from speigg January 23, 2023 02:56
@HexaField HexaField marked this pull request as ready for review January 23, 2023 02:58
Copy link
Contributor

@mrhegemon mrhegemon left a comment

Choose a reason for hiding this comment

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

Hip solver is so cool.

@HexaField HexaField marked this pull request as draft January 23, 2023 05:37
@HexaField HexaField marked this pull request as ready for review January 23, 2023 08:56
@speigg speigg merged commit aaa2f81 into dev Jan 25, 2023
@speigg speigg deleted the full-body-ik branch January 25, 2023 05:54
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add Full Body IK MVP with a simple squat mechanic
3 participants