# Input as a reference for custom AnimGraph node?

**URL:** <https://forums.unrealengine.com/t/input-as-a-reference-for-custom-animgraph-node/439926>\
**Category:** Character & Animation\
**Tags:** bone-transform, unreal-engine, question, CPP\
**Created:** [December 21, 2018, 6:38pm UTC](https://forums.unrealengine.com/t/input-as-a-reference-for-custom-animgraph-node/439926 "2018-12-21T18:38:30Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ChopinDev](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@ChopinDev](https://forums.unrealengine.com/u/ChopinDev)\
**Post date:** [December 21, 2018, 6:38pm UTC](https://forums.unrealengine.com/t/input-as-a-reference-for-custom-animgraph-node/439926/1 "2018-12-21T18:38:30Z")

</div>

Hi! I’ve written my own AnimGraph node. It’s purpose is to get current bone location. However, I would like to use this location whenever I want, not only inside this node logic. If you think I can use sockets, please read carefully my question. I need a bone location extracted from anywhere inside my anim graph logic. Like after some Cache and before IK.

 ![263034-0first.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/0/7/1/0715e3bab5a7494454ce8a142840aed99b780ef5.png)

1. My first approach was to create an input node as a reference, attach some variable to it and change it inside custom node logic. However, it seems impossible to make UPROPERTY as a reference variable. For functions, one can make a variable reference input with UPARAM(ref). I did some experiments, like manually declaring FVector& Location, but reference member of a class requires initialization before constructor and “Location” once initialized did not use variable attached to the input pin.

2. I don’t see a way to output any variable from AnimNode. There is this topic [https://answers.unrealengine.com/questions/492873/custom-anim-node-problem-with-getting-output-pin-t.html](https://answers.unrealengine.com/questions/492873/custom-anim-node-problem-with-getting-output-pin-t.html)  
But the problem is unanswered and even if it was possible, I still cannot use it outside AnimGraph, I mean look at this picture:

 ![263035-0second.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/c/1/5/c152f96627d678be78ca1abb51ab8c0fd1f0d18a.png)

If you know smart workaround I would like to know it 🙂 Or correct me if I did something wrong.  
In the end I need a bone location after animation is taken into account, but before IK.

---

<div class="post-metadata">

**Author:** ![ChopinDev](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@ChopinDev](https://forums.unrealengine.com/u/ChopinDev)\
**Post date:** [December 21, 2018, 7:43pm UTC](https://forums.unrealengine.com/t/input-as-a-reference-for-custom-animgraph-node/439926/2 "2018-12-21T19:43:45Z")

</div>

I guess I can parse as an input a reference to object, like anim blueprint itself, and with that reference I can modify all variables I want.
