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.
I added the following code on the BeginPlay of the level Blueprint:
Also created my own character (based on the FPS template):
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!
asked Sep 08 '16 at 01:07 PM in Blueprint Scripting
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:
answered Sep 08 '16 at 06:27 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here