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"

top down: Rotating my camera in game but WASD movement mixed up

Hello, I'm very new to unreal blueprint scripting and can't find a solution online after endless searching.

My problem is as follows:

When I rotate the camera using my Right mouse button, my WASD keys get mixed up, for example normally your W key, forward key, always goes to the top of your screen, but when I rotate my camera it doesn't do that anymore, same for left, right, back keys.

So basically when I rotate my camera my forward key should always go to the top of the screen, my left key to the left side of the screen, etc.

Would appreciate the help!

Here are some screenshots of mouse rotation, moving and my axis mapping.

Product Version: UE 4.19
Tags:
more ▼

asked May 28 '18 at 09:20 PM in Blueprint Scripting

avatar image

idbxy
1 1

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

1 answer: sort voted first

If i understand correctly, you want to go to the "up" of where your camera is looking, not your worlds up. When you add movement input of 1,0,0 , you always move forward the absolute "up" in your case.

Instead connect this to the movement input, but this will result with your speed changing if your camera ever looks up or down. (As in if you ever want to raise cameras front up or down)

alt text

If that is the case, you can use this one.It projects your camera's up to the ground plane (normal of 0,0,1 means it is looking directly up) With this new projection, we can divide it to its length to get a vector with 1 length, no matter what the projection was.

Hope you find this helpful!

alt text

capture.png (39.1 kB)
capture.png (82.3 kB)
more ▼

answered May 29 '18 at 05:11 PM

avatar image

FlameOfIgnis
399 5 4 13

(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