Character rotate to his camera's rotation WHEN InputAxis is pressed

Hello :slight_smile:

I’m looking for help with my character movements and his camera rotation. I want to have a free cam with the mouse to look around (like in the base Third Person Blueprint) but I also want to always see his back when I press input (like when you untick Orient Rotation to Movement, actually this is what I’ve done on my character).

So I created my InputAxis MoveForward for my character to move forward and a “Set Actor Rotation” to rotate the character’s yaw with the camera’s movements. They both work great.
But I want my Set Actor Rotation to fire ONLY WHEN I press my forward input. My main problem is to understand how to link them together to achieve this.

I guess I have to do something between Add Movement Input and Set Actor Rotation?

Hope my request is understandable ! :confused:

The InputAxis MoveForward is always activating, so you need to do one check before it activates Set Actor Rotation. If you create the Get InputAxis MoveForward then create a node Float > Float. Pick the MoveForward Axis to the top checking against 0, meaning its moving forward. Then create a Branch, and Pick from the Float compare to the condition. Lastly, Pick from Add Movement Input to the Branch, and Pick True to Set Actor Rotation. Also, you you want the Camera to Update to the Characters Rotation. You have to set he Target for Get Actor Rotation & Set Actor Rotation to the players cam.

Another note, because I’m not exactly sure how you have your setup. You may want to change the rotation of the Spring Arm parenting the camera, since the camera always faces the player.

Hi MathieuSP,

We have not heard back from you in a few days, so we are marking this post as Resolved for tracking purposes. If you are still experiencing the issue you reported, please respond to this message with additional information and we will offer further assistance.

Thank you.