Skip to content

Commit

Permalink
Fixed flow on curved bones
Browse files Browse the repository at this point in the history
  • Loading branch information
ksuprynowicz committed Aug 27, 2023
1 parent 8c87d6f commit 0c2fe4c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libraries/animation/src/Flow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -363,8 +363,8 @@ void FlowThread::computeRecovery() {
int parentIndex = _joints[0];
auto parentJoint = _jointsPointer->at(parentIndex);
_jointsPointer->at(parentIndex)._recoveryPosition = parentJoint._recoveryPosition = parentJoint._currentPosition;
glm::quat parentRotation = parentJoint._parentWorldRotation * parentJoint._initialRotation;
for (size_t i = 1; i < _joints.size(); i++) {
glm::quat parentRotation = parentJoint._parentWorldRotation * parentJoint._initialRotation;
auto joint = _jointsPointer->at(_joints[i]);
_jointsPointer->at(_joints[i])._recoveryPosition = joint._recoveryPosition = parentJoint._recoveryPosition + (parentRotation * (joint._initialTranslation * _rigScale));
parentJoint = joint;
Expand Down

0 comments on commit 0c2fe4c

Please sign in to comment.