Character rotate to his camera's rotation WHEN InputAxis is pressed
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 ! :/
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.
Follow this question
Once you sign in you will be able to subscribe for any updates here