x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

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

Hello :)

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?

alt text

Hope my request is understandable ! :/

Product Version: Not Selected
Tags:
more ▼

asked Apr 18 '14 at 01:38 PM in Blueprint Scripting

avatar image

MathieuSP
3 2 5 5

avatar image [Epic] Gribbs ♦♦ STAFF May 30 '14 at 02:51 PM

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.

(comments are locked)
10|2000 characters needed characters left

1 answer: sort voted first

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.

more ▼

answered Apr 18 '14 at 08:40 PM

avatar image

PeterLNewton
2.1k 75 36 110

(comments are locked)
10|2000 characters needed characters left
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question