Repository navigation
Fix: bones no longer rotates around their offset - #119
Open
midona-rhel wants to merge 1 commit into
Open
midona-rhel wants to merge 1 commit into
midona-rhel wants to merge 1 commit into
Conversation
Member
|
Thanks, I will check this one when I get some free time. I think it will be reasonable to release this alongside #118. |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Notes
This fix resolves #117, instead of rotating a bone around its own offset, as it currently does, for each bone translation the parents rotation and rest rotation is used to calculate its current direction of translation. This was tested in game and is easily reproducible with current posing tools, create a profile that moves the arm bone down in space for example, and then try rotating it around the z axis, this results in the bones offset rotating around its original position:
Current
Fix
Breaking change
This PR and issue most likely affects a very small number of users meaningfully, it is to me the more obvious correct way to deal with this, but I also have to acknowledge that presets will look different. I am truly not sure if anyone really relies on this meaningfully, since to me it seems very counterintuitive that a root of a bone should change with the bone itself rotating, and this in my testing creates very weird IK behavior and causes posing to misbehave when rotating bones there without propagation. I hope this is a meaningful fix that will have exclusively a positive impact but I feel that this really should bear mentioning for this PR.
AI attribution
Pair: I used claude to help identify the absolute meaningful fix for this bug, and after making sure I understood the bug to its fullest had it write the code for the fix. The comments and this PR are written by me and I have fully tested and verified the behavior and looked at the code to confirm this resolves the issue.