How do I set the rotation of a character?

Hey,

I’m trying to set something up so that my third person camera will rotate around my character when I hold the left mouse button.

When I hold the right mouse button, I’d like the character to turn his back to the camera, and then have the camera sit behind my character while I continue holding down RMB and move my mouse around.

I’ve had to stop my springarm from inheriting pitch and yaw from the controller, in order to have them move separately, and I’ve managed to be able to move the camera around my character with LMB, but I can’t seem to get the character to face the direction the camera is pointing when I click RMB.

Here’s what I’ve got so far:

The first part works great, but in the second image, I’m trying to set the rotation of the character to be that of the springarm (boomRotation, but only taking yaw), and it’s not working. I’ve tried nearly every different object rotation function in the list, and I can’t work it out.

Thanks!

Just in case anyone was wanting wow-style camera controls and happens to stumble across this, here’s the solution I ended up finding using blueprints. Works flawlessly.

You can pretty simply check for both the LMB and RMB boolean variables to move your character forward as well, if you wish.