So in my game the character can select a target by clicking on an actor. The actor implements a “targetable” interface that will return its aim point on request. When the player clicks the actor and gets the aim point I can calculate the “look at rotation” from my character’s muzzle socket to the target actor. I observe my socket’s rotation and realize that once my socket’s rotation is the same (pitch/yaw) as the look at rotation then I can fire a projectile and hit the target.
I wish to have the character, via the animation blueprint, automatically point the weapon at the target if valid. I already have an aim offset and I can feed in pitch and yaw manually to the aim offset to get the rotations aligned. I cannot figure out how to do this automatically. I think the challenge comes in the fact that each time I adjust the aim pitch/yaw it changes the location of the muzzle socket slightly which also changes the look at rotation and the socket rotation.
Thanks for the help!