Add support for overriding Anim Graph output for Animated Model
This commit is contained in:
@@ -273,6 +273,9 @@ void AnimGraphExecutor::Update(AnimGraphInstanceData& data, float dt)
|
||||
animResult = GetEmptyNodes();
|
||||
}
|
||||
|
||||
// Allow for external override of the local pose (eg. by the ragdoll)
|
||||
data.LocalPoseOverride(animResult);
|
||||
|
||||
// Calculate the global poses for the skeleton nodes
|
||||
{
|
||||
ANIM_GRAPH_PROFILE_EVENT("Global Pose");
|
||||
|
||||
@@ -75,7 +75,7 @@ struct RootMotionData
|
||||
/// Container for skeleton nodes transformation hierarchy and any other required data.
|
||||
/// Unified layout for both local and model transformation spaces.
|
||||
/// </summary>
|
||||
struct AnimGraphImpulse
|
||||
struct FLAXENGINE_API AnimGraphImpulse
|
||||
{
|
||||
/// <summary>
|
||||
/// The skeleton nodes transformation hierarchy nodes. Size always matches the Anim Graph skeleton description.
|
||||
@@ -245,7 +245,7 @@ public:
|
||||
/// <summary>
|
||||
/// The animation graph instance data storage. Required to update the animation graph.
|
||||
/// </summary>
|
||||
class AnimGraphInstanceData
|
||||
class FLAXENGINE_API AnimGraphInstanceData
|
||||
{
|
||||
public:
|
||||
|
||||
@@ -347,6 +347,11 @@ public:
|
||||
/// </summary>
|
||||
ScriptingObject* Object;
|
||||
|
||||
/// <summary>
|
||||
/// The custom event called after local pose evaluation.
|
||||
/// </summary>
|
||||
Delegate<AnimGraphImpulse*> LocalPoseOverride;
|
||||
|
||||
public:
|
||||
|
||||
/// <summary>
|
||||
|
||||
Reference in New Issue
Block a user