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"

Movement Input Problem

I have two playable character and whenever I swap to the other character the movement direction controls change itself, depending on what way the character is facing. For an example, when game starts the character is facing the top of the screen, so when I press W it moves to the top which is the direction needed. If I swap to the next character and it is facing the bottom of the screen the W button moves the character towards the bottom, not the top. Same as the right and left. I had this problem with the camera too but that was solved by not allowing the Pitch row and yaw to move. However I cannot find out a way to lock the controls to the world axis.

Product Version: UE 4.17
more ▼

asked Mar 07 '18 at 04:05 PM in Blueprint Scripting

avatar image

18 4 6 11

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

What node are you using to move? I use AddMovementInput in the character/pawn. That takes a world direction so I actually have to add nodes to get it to consider 'forward' to be where the character is facing.

That means you can just plug in a world vector there. You'd use (1,0,0) for the Forward/Back movement and (0,1,0) for the Right/Left movement.

more ▼

answered Mar 07 '18 at 09:12 PM

avatar image

4.5k 32 79 42

avatar image EmilyBec Mar 07 '18 at 10:24 PM

Thank you for your help :) I am new to blueprint so I have no idea what node I was using but it was the default third person character movement. However I sorted it out but I have no idea if it is the right way to do it but I replaced the GetControlRotation with GetWorldLocation

avatar image Jin_VE Mar 07 '18 at 10:44 PM

OK this is such an easy one that I'll post the code. In the ThirdPersonCharacter blueprint, you will see code like this. alt text

You want it to look like this. alt text

Once you see it works, you can delete the unused nodes.

movementinput.png (131.2 kB)
avatar image EmilyBec Mar 07 '18 at 10:57 PM

Thank you very much! this is the way I had it but I will change it to the way you showed mealt text

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
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