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"

Recreate default pawn movement


I'm trying to make my own character with the same type of movement as the default pawn (like fly around but with no physics). The reason I cannot use the default pawn is that I need to use UE's virtual joysticks on a Windows PC with touch screen (see image). These joysticks should also be clickable with the mouse. So if I use the default pawn, when I move the mouse towards a joystick the camera rotates. Virtual joysticks

I added the following code on the BeginPlay of the level Blueprint: mouse

Also created my own character (based on the FPS template): character

Now this works exactly as desired in the sense that the player can either touch the joysticks or use the mouse to move them, and the mouse doesn't rotate the screen (the mouse movement is not binded to any Axis Mapping). The problem is that this is a First Person that walks around, and I need it to fly like the Default Pawn. I know that the movement doesn't need the GetActorForwardVector and GetActorRightVector as directions, but I cannot find what direction to use. In CharacterMovement, there's a setting "Default Land Movement Mode", and changing this to Flying does not work either.

I appreciate any help or comments.

Thank you in advance!

Product Version: UE 4.12
untitled.png (491.7 kB)
disable mouse.png (57.8 kB)
character.png (289.7 kB)
more ▼

asked Sep 08 '16 at 01:07 PM in Blueprint Scripting

avatar image

45 3 4 7

avatar image lucas188 Aug 15 '17 at 07:50 AM

Exactly what I've been searching for. Cant believe that it was that simple! Thank you!

JSON Formatter

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

1 answer: sort voted first

After a couple of hours I managed to find a solution, cannot believe it was that simple...

I needed GetControlRotation, that returns a Rotator, I was looking only for functions that returned Vector3 that was why I could never find it.

Image with solution: alt text

solution.png (134.8 kB)
more ▼

answered Sep 08 '16 at 06:27 PM

avatar image

45 3 4 7

(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