Added Animator events and fixed Animator pause bug #418
|
@ -124,9 +124,13 @@ namespace SHADE
|
|||
std::fill(boneMatrices.begin(), boneMatrices.end(), SHMatrix::Identity);
|
||||
|
||||
// Do not do anything if is not playing or there's nothing to animate
|
||||
if (!isPlaying || !rig || !rig->GetRootNode())
|
||||
if (!rig || !rig->GetRootNode())
|
||||
return;
|
||||
|
||||
// We want to still display a paused pose, so we only prevent progression
|
||||
if (!isPlaying)
|
||||
dt = 0.0f;
|
||||
|
||||
// Update the animation controller if any, this will set the currClip
|
||||
if (animController)
|
||||
{
|
||||
|
@ -270,7 +274,7 @@ namespace SHADE
|
|||
void SHAnimatorComponent::updateCurrentAnimatorState(Handle<SHAnimationClip> clip, float playbackTime)
|
||||
{
|
||||
// Nothing to animate
|
||||
if (!clip || !isPlaying || !rig || !rig->GetRootNode())
|
||||
if (!clip || !rig || !rig->GetRootNode())
|
||||
return;
|
||||
|
||||
// Check that we have animation data
|
||||
|
|
Loading…
Reference in New Issue