AutoAnimationBlend on unique node working but scale is not working correctly
This commit is contained in:
@@ -3,13 +3,19 @@
|
||||
|
||||
#include "GLM.h"
|
||||
|
||||
#include "Common.h"
|
||||
#include "Core/System.h"
|
||||
#include "Core/ResourceManager.h"
|
||||
#include "../Common.h"
|
||||
#include "../Core/System.h"
|
||||
#include "../Core/ResourceManager.h"
|
||||
#include "Rendering/Model.h"
|
||||
#include "Rendering/EAnimationComplete.h"
|
||||
#include "Rendering/Skeleton.h"
|
||||
#include "Rendering/BlendTree.h"
|
||||
#include "Rendering/EAnimationBlend.h"
|
||||
#include "Rendering/EAutoAnimationBlend.h"
|
||||
#include "../Input/EInputCommand.h"
|
||||
#include "../Core/EntityWrapper.h"
|
||||
|
||||
#include "imgui/imgui.h"
|
||||
|
||||
class AnimationSystem : public ImpureSystem
|
||||
{
|
||||
@@ -20,7 +26,49 @@ public:
|
||||
private:
|
||||
void CreateBlendTrees();
|
||||
void UpdateAnimations(double dt);
|
||||
void UpdateWeights(double dt);
|
||||
void AnimationComplete(EntityWrapper animationEntity);
|
||||
|
||||
EventRelay<AnimationSystem, Events::AnimationBlend> m_EAnimationBlend;
|
||||
bool OnAnimationBlend(Events::AnimationBlend& e);
|
||||
EventRelay<AnimationSystem, Events::AutoAnimationBlend> m_EAutoAnimationBlend;
|
||||
bool OnAutoAnimationBlend(Events::AutoAnimationBlend& e);
|
||||
|
||||
|
||||
EventRelay<AnimationSystem, Events::InputCommand> m_EInputCommand;
|
||||
bool OnInputCommand(const Events::InputCommand& e);
|
||||
|
||||
struct BlendJob
|
||||
{
|
||||
EntityWrapper BlendEntity = EntityWrapper::Invalid;
|
||||
double StartWeight;
|
||||
double GoalWeight;
|
||||
double Duration;
|
||||
double CurrentTime = 0.0;
|
||||
};
|
||||
|
||||
struct QueuedBlendJob : BlendJob
|
||||
{
|
||||
EntityWrapper AnimationEntity = EntityWrapper::Invalid;
|
||||
};
|
||||
|
||||
struct AutoBlendJob
|
||||
{
|
||||
EntityWrapper RootNode = EntityWrapper::Invalid;
|
||||
double Duration;
|
||||
double CurrentTime = 0.0;
|
||||
BlendTree::AutoBlendInfo BlendInfo;
|
||||
};
|
||||
|
||||
std::list<AutoBlendJob> m_AutoBlendJobs;
|
||||
std::list<BlendJob> m_BlendJobs;
|
||||
std::list<QueuedBlendJob> m_QueuedBlendJobs;
|
||||
|
||||
char m_AnimationName1[20] = "Run";
|
||||
float m_BlendTime1 = 0.5f;
|
||||
|
||||
char m_AnimationName2[20] = "Jump";
|
||||
float m_BlendTime2 = 0.5f;
|
||||
};
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user