Recreate default pawn movement

anonymous_user_5c36c7b6
Thu, 08 Sep 2016 13:07:55 +0000
Character & Animation

Hi

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!

3 posts - 1 participant