mirror of
https://github.com/lubosz/overte.git
synced 2025-08-08 03:08:00 +02:00
Fixed flow on curved bones
This commit is contained in:
parent
8c87d6f835
commit
0c2fe4c81f
1 changed files with 1 additions and 1 deletions
|
@ -363,8 +363,8 @@ void FlowThread::computeRecovery() {
|
||||||
int parentIndex = _joints[0];
|
int parentIndex = _joints[0];
|
||||||
auto parentJoint = _jointsPointer->at(parentIndex);
|
auto parentJoint = _jointsPointer->at(parentIndex);
|
||||||
_jointsPointer->at(parentIndex)._recoveryPosition = parentJoint._recoveryPosition = parentJoint._currentPosition;
|
_jointsPointer->at(parentIndex)._recoveryPosition = parentJoint._recoveryPosition = parentJoint._currentPosition;
|
||||||
glm::quat parentRotation = parentJoint._parentWorldRotation * parentJoint._initialRotation;
|
|
||||||
for (size_t i = 1; i < _joints.size(); i++) {
|
for (size_t i = 1; i < _joints.size(); i++) {
|
||||||
|
glm::quat parentRotation = parentJoint._parentWorldRotation * parentJoint._initialRotation;
|
||||||
auto joint = _jointsPointer->at(_joints[i]);
|
auto joint = _jointsPointer->at(_joints[i]);
|
||||||
_jointsPointer->at(_joints[i])._recoveryPosition = joint._recoveryPosition = parentJoint._recoveryPosition + (parentRotation * (joint._initialTranslation * _rigScale));
|
_jointsPointer->at(_joints[i])._recoveryPosition = joint._recoveryPosition = parentJoint._recoveryPosition + (parentRotation * (joint._initialTranslation * _rigScale));
|
||||||
parentJoint = joint;
|
parentJoint = joint;
|
||||||
|
|
Loading…
Reference in a new issue