What's the simplest way to drive two bones procedurally?

I have a skeletal mesh with a skeleton and a number of bones. Bone B is a child of bone A. In identity pose, the geometry bound to bone B ends up pointing straight down the X axis in actor (mesh) space.
I have a world direction vector.
I want to apply yaw on bone A and pitch on bone B to make the geometry bound to bone B point in that world space elevation.
I know how to calculate the transform to go from mesh space forward-along-X into world space desired-forward-vector.
I also know how to break this into degrees-yaw and degrees-pitch.

What I don’t know is how to take these values, and jam them into the pose of the skeletal mesh such that only these two bones change. I have no idle animation, no “end point” aim animations, or anything like that. I just want to jam rotation values into bones[a] and bones[b].

How can I do this the easiest? I’ve been looking at an animation blueprint that can get my skeletal mesh, get the appropriate bone indices by name, and then I run into a brick wall – I can’t find any blueprint nodes that seem like they would do what I want. Also, the difference between the “event graph” and the “anim graph” seems somewhat superfluous to me, which probably means I’m missing some concept here.

I’ve read the animation documentation, which unfortunately talks only about the case where I have an animated character with full-body poses for various aim directions. I have none of that. Do I need to create all of those? That’d be a pain but possible if there’s no simpler way.

Hi,

I think Skeletal Controls are exactly what you need for this. These are nodes in the Animation Blueprint that you can use to drive the translation/rotation/scale of bones. Documentation here: LINK.

Note, in order for these to work, you might need to pass the ref pose of your skeleton through the skelControl node (there are already nodes in the AnimBP to do that). I’ve never just driven something without any animation under it; so, that may or may not be necessary.

Good luck.