Clear transition flag in SceneNodeAnimator

This fixes certain issues with animation blending.
This commit is contained in:
Vsevolod Kremianskii 2021-05-06 11:35:50 +07:00
parent 042d9be42f
commit 4d8b298e3a
3 changed files with 6 additions and 0 deletions

View file

@ -225,6 +225,10 @@ bool AnimationChannel::getSceneNodeStateByNumber(uint16_t nodeNumber, SceneNodeS
return false;
}
string AnimationChannel::getAnimationName() const {
return _animation ? _animation->name() : "";
}
void AnimationChannel::setTime(float time) {
_time = time;
}

View file

@ -81,6 +81,7 @@ public:
float getTransitionTime() const;
bool getSceneNodeStateByNumber(uint16_t nodeNumber, SceneNodeState &state) const;
std::string getAnimationName() const;
float time() const { return _time; }

View file

@ -290,6 +290,7 @@ void SceneNodeAnimator::playAnimation(shared_ptr<Animation> anim, AnimationPrope
_transition = true;
} else {
_channels[0].reset(anim, properties, lipAnim);
_transition = false;
}
}
break;