As the title says , EvaluateComponentSpace from a FAnimNode_Base derived struct wont even execute a print function whereas the Evaluate executes without problems . In fact , the whole project crashes when i try to connect the graph node while having EvaluateComponentSpace implemented .
I have a strong feeling this is an engine bug and i hope the epic staff can respond to my question .
My problem :
- EvaluateComponentSpace wont execute
-
The engine crashes when i connect the
newly created node in the anim
graph when EvaluateComponentSpace is
implemented
My .h file
USTRUCT()
struct FAnimNode_FullBodyIK : public FAnimNode_Base
{
GENERATED_BODY()
public:
/** Used for containing the structure of the skeleton for accessing during IK computation */
/** Base Pose*/
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = Links)
FComponentSpacePoseLink BasePose;
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = Links, meta = (PinShownByDefault))
FVector target_location_input;
/** How Quickly to Blend In/Out of Turn Pose */
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = Links, meta = (PinShownByDefault))
float simple_alpha;
virtual void Initialize(const FAnimationInitializeContext& Context) override;
virtual void CacheBones(const FAnimationCacheBonesContext & Context) override;
virtual void Update(const FAnimationUpdateContext & Context) override;
virtual void EvaluateComponentSpace(FComponentSpacePoseContext & Output) override;
virtual void Evaluate(FPoseContext& Output) override;
AProtagonistCharacter *owning_actor;
USkeletalMeshComponent *owning_skeleton;
};
UCLASS()
class PANTHERPROJECT_API UAGNode_SkeletalControlBase : public UAnimGraphNode_Base
{
GENERATED_BODY()
UPROPERTY(EditAnywhere, Category = Settings)
FAnimNode_FullBodyIK ik_Node;
public:
UAGNode_SkeletalControlBase(const FObjectInitializer& ObjectInitializer);
/*I dont know what this is so its commented out.
UPROPERTY(EditAnywhere, Category = "Attacks")
FPA_AnimNode_StartCombo Node;
*/
void line_trace_func(FHitResult RV_Ragdoll_Hit, FName bone_text, FName trace_tag, FHitResult& Output);
virtual FText GetNodeTitle(ENodeTitleType::Type TitleType) const override;
virtual FText GetTooltipText() const override;
virtual FString GetNodeCategory() const override;
virtual FLinearColor GetNodeTitleColor() const override;
protected:
virtual FText GetControllerDescription() const;
};
The anim behaviour node .cpp functions :
void FAnimNode_FullBodyIK::EvaluateComponentSpace(FComponentSpacePoseContext & Output)
{
GEngine->AddOnScreenDebugMessage(-1, 5.f, FColor::Red, "Actor Evaluate Component ");
}
void FAnimNode_FullBodyIK::Evaluate(FPoseContext & Output)
{
GEngine->AddOnScreenDebugMessage(-1, 5.f, FColor::Red, "Actor Evaluate Bone ");
}
void FAnimNode_FullBodyIK::Initialize(const FAnimationInitializeContext & Context)
{
BasePose.Initialize(Context);
}
void FAnimNode_FullBodyIK::CacheBones(const FAnimationCacheBonesContext & Context)
{
BasePose.CacheBones(Context);
}
void FAnimNode_FullBodyIK::Update(const FAnimationUpdateContext & Context)
{
// GEngine->AddOnScreenDebugMessage(-1, 5.f, FColor::Red, "Update");
BasePose.Update(Context);
}