Download

How to set defauljoystick in cpp ( mobile game)

Hello guys I am trying to setup input for my game. I have W,A,S,D which are working fine but I want to use touch (default joystick that unreal provides when we make mobile game)

How to setup that ?


Current code :

Super::SetupPlayerInputComponent(PlayerInputComponent);
PlayerInputComponent->BindAxis("MoveForward", this, &APawnTank::CalculateMoveInput);
PlayerInputComponent->BindAxis("Turn", this, &APawnTank::CalculateRotateInput);
PlayerInputComponent->BindAction("Fire", IE_Pressed, this, &APawnTank::Fire);


Project settings

viewport : if you see those transparent joystick when i move them the player won’t move but keyboard command works