# Incorrect directions error on custom AnimBP node

**URL:** <https://forums.unrealengine.com/t/incorrect-directions-error-on-custom-animbp-node/434254>\
**Category:** Character & Animation\
**Tags:** unreal-engine, custom-nodes, CPP, question\
**Created:** [September 22, 2018, 12:18am UTC](https://forums.unrealengine.com/t/incorrect-directions-error-on-custom-animbp-node/434254 "2018-09-22T00:18:43Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![anonymous\_user\_0ba2eb3c](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_0ba2eb3c](https://forums.unrealengine.com/u/anonymous_user_0ba2eb3c)\
**Post date:** [September 22, 2018, 12:18am UTC](https://forums.unrealengine.com/t/incorrect-directions-error-on-custom-animbp-node/434254/1 "2018-09-22T00:18:43Z")

</div>

I’m trying to make a node that returns the component space of a specified bone. So far the node compiles with no problem if I only attach the pose link pins, but when I try to use the Location output pin (a vector) with a break, I get an error saying the directions aren’t compatible.

Take a look at the screenshot:

 ![254369-screenshot-1.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/f/c/a/fca4b1d7b3898a970c0041f94acfc2350f884746.png)

Here’s the part of my code that I think that matters (if you’d like to see other parts of my code, please ask):

**AnimGraphNode\_GetBoneLocation.cpp**

```
void UAnimGraphNode_GetBoneLocation::CopyNodeDataToPreviewNode(FAnimNode_Base* InPreviewNode)
{
	FAnimNode_GetBoneLocation* inNode = static_cast<FAnimNode_GetBoneLocation*>(InPreviewNode);

	inNode->Bone = Node.Bone;
}

void UAnimGraphNode_GetBoneLocation::CopyPinDefaultsToNodeData(UEdGraphPin* InPin)
{
}
void UAnimGraphNode_GetBoneLocation::CreateOutputPins()
{
	//Super::CreateOutputPins();

	CreatePin(EGPD_Output, UAnimationGraphSchema::PC_Struct, FComponentSpacePoseLink::StaticStruct(), TEXT("Pose"));
	CreatePin(EGPD_Output, UAnimationGraphSchema::PC_Struct, TBaseStructure<FVector>::Get(), TEXT("Location"));
}

```

**AnimNode\_GetBoneLocation.h**

```
	UPROPERTY(BlueprintReadOnly)
	FVector Location;

```

If someone could explain to me what _CopyNodeDataToPreviewNode_ and _CopyPinDefaultsToNodeData_ do and how to use them, I’d be grateful it.  
Also, I do not understand how `CreatePin(EGPD_Output, UAnimationGraphSchema::PC_Struct, FComponentSpacePoseLink::StaticStruct(), TEXT("Pose"));` knows that this is the pose output pin of my node, since I have no Pose pin anywhere.

There’s too little documentation about these custom AnimBP nodes. Any other information, tips, etc on the subject are appreciated.

---

<div class="post-metadata">

**Author:** ![ltingting](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@ltingting](https://forums.unrealengine.com/u/ltingting)\
**Post date:** [June 21, 2023, 5:18am UTC](https://forums.unrealengine.com/t/incorrect-directions-error-on-custom-animbp-node/434254/2 "2023-06-21T05:18:49Z")

</div>

Have you found a solution yet
