Bone to follow pawn movement
I have a very simple skeletal mesh with just 3 bones. I would like to move those bones from my C++ code. I've read that some users in this forum suggest to use UPoseableMeshComponent. However, I'm not able to access it correctly in my code. I was wondering if it would be easier to simple link a pawn to each of those bones and then move the pawn using C++. Therefore, the bone will move when the pawn does so.
Does this make sense? I believe I could do the bone-pawn link using a blueprint and then move the pawn using C++.
Maybe I should follow a different approach? move the bones by using animation blueprinte whose inputs are send from the C++ code?
This is the approach I followed: I created a Pawn class in C++ and assign to it some movement (I'll show some basic roation in this answer)
Then, I opened the BluePrint of that class in the editor and assigned to it a SkeletalMesh of a head. This SkeletalMesh is liked to an Animation BluePrint that I've also created. These are the steps I followed to link the pawn's movement generated in the C++ code to one of the bones (the neck bone) of my skeletal mesh (the head):
This is the final result:
Follow this question
Once you sign in you will be able to subscribe for any updates here