mirror of
https://github.com/overte-org/overte.git
synced 2025-04-23 15:13:41 +02:00
fix for clearJointData() in JS scripts
let the JointState class verify animation priority
This commit is contained in:
parent
3fbbeecb8c
commit
6cdee21a50
1 changed files with 4 additions and 6 deletions
|
@ -708,12 +708,10 @@ void Model::clearJointAnimationPriority(int index) {
|
|||
void Model::setJointState(int index, bool valid, const glm::quat& rotation, float priority) {
|
||||
if (index != -1 && index < _jointStates.size()) {
|
||||
JointState& state = _jointStates[index];
|
||||
if (priority >= state._animationPriority) {
|
||||
if (valid) {
|
||||
state.setRotationInConstrainedFrame(rotation, priority);
|
||||
} else {
|
||||
state.restoreRotation(1.0f, priority);
|
||||
}
|
||||
if (valid) {
|
||||
state.setRotationInConstrainedFrame(rotation, priority);
|
||||
} else {
|
||||
state.restoreRotation(1.0f, priority);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue