Hi everyone,
I’m working on a plugin for Unreal which its objective is to manage a lot of realistic virtual agents in a VR environment.
Since the last few weeks, I’m trying to create a custom node in C++ for an Animation BP. The objective is to simplify my graph and make it easier to use for future users of the plugin we are developing in our lab, and make the process of animation blending faster by only using C++ logic.
Basically, the graph calculate the movements of an agent and depending on parameters. It can display head movements (like nod and shake) and orient its gaze towards the user or a target in the map, by blending the base pose and other animation clips together to create a custom final pose to display.
As it is right now, I want to reproduce the head movements of the character by merging together this part of the blueprint :
https://forums.unrealengine.com/filedata/fetch?filedataid=184476&type=thumb&attachmentnodeid=
What I tried to do is to write the internal C++ code of the Blend Poses by Int, Layered Blend per Bone and Blend Poses by Bool from the engine into my custom node and trying to adapt it to my desires. But the issues I got were that the character sometimes shows glitches in the transitions between two movements, the head movements plays 2 or 3 times too fast, and the layering doesn’t work properly. I’ve narrowed the last problem by removing the boolean blend part, which led me to this graph. Ideally, the boolean blend should also be in the main node. Optionally, the option to add an input child pose in the contextual menu doesn’t work, but it is not important at the moment.
https://forums.unrealengine.com/filedata/fetch?filedataid=184477&type=thumb&attachmentnodeid=
My questions are : is there a solution to these problems ? And by extension, is it possible to merge the behaviour of many existing animation nodes into a custom one ? In my situation, is there also any optimization interest or should I just stick to BP ?
I’ve also attached the files containing the code of the node.
Thanks for reading this far