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"

Office Holiday

Epic Games' offices will be on holiday from June 22nd to July 7th. During this period support will be limited. Our offices will reopen on Monday, July 8th. 

Changing controllers during gameplay

I want to change the inputs direction during gameplay to adapt my camera changes ( As in this video https://twitter.com/SeijiGameDev/status/1030304438500687873 )

Since the perspective change, the commands should adapt to the camera. Let's say W and S move on X axis, and A and D move on Y. If I turn my camera 90 degrees, A and D should be in X axis. (The video helps to understand what I am trying to say)

So, I've been trying to change in the Level Blueprint, just like I do my camera changes, what I am trying to do right now is rotating the character, so the Forward and Right vector rotate with it and all works... But the character rotates and the controller dont.

At first I was thinking in changing between PlayerControllers, but I readed that I would have to reload the level to do so.

So, how should I do it? Should I place all my controller schemes in one Player Controller and use some booleans to comunicate which one to use from the level blueprint? Or am I just missing something when I try to rotate the character?

Thanks for the help

Product Version: UE 4.20
Tags:
screenshot-2.png (172.4 kB)
screenshot-3.png (286.3 kB)
more ▼

asked Aug 18 '18 at 02:57 AM in Blueprint Scripting

avatar image

Rhesh-
8 1 3

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

1 answer: sort voted first

What if before feeding your movement input into the Node that moves the actor, pass the movement vector through a node to make the movement vector you're about to use orient its forward the same as the camera's?

more ▼

answered Aug 18 '18 at 07:13 AM

avatar image

mightyenigma
3.8k 18 20 20

avatar image Rhesh- Aug 18 '18 at 02:41 PM

Hey, thanks!

I didn't know how to make the movement vector from the pawn get the camera orientation. Instead I got the camera forward and right vector, and now it's working exactly how I wanted!

Thanks for the help, I didn't know I could get the movement vectors from the camera.

alt text

screenshot-4.png (148.0 kB)
avatar image mightyenigma Dec 10 '18 at 09:41 PM

Oh I'm glad that worked! Please mark my answer as Accepted to help others find this solution :)

avatar image Rhesh- Dec 10 '18 at 10:05 PM

Marked, thanks :D

(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