# How to set defauljoystick in cpp ( mobile game)

**URL:** <https://forums.unrealengine.com/t/how-to-set-defauljoystick-in-cpp-mobile-game/480754>\
**Category:** Mobile\
**Tags:** mobile-device, unreal-engine, joystick, question\
**Created:** [March 23, 2021, 6:30pm UTC](https://forums.unrealengine.com/t/how-to-set-defauljoystick-in-cpp-mobile-game/480754 "2021-03-23T18:30:01Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![nightmare\_unreal](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@nightmare\_unreal](https://forums.unrealengine.com/u/nightmare_unreal)\
**Post date:** [March 23, 2021, 6:30pm UTC](https://forums.unrealengine.com/t/how-to-set-defauljoystick-in-cpp-mobile-game/480754/1 "2021-03-23T18:30:01Z")

</div>

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

 ![333297-project-settings.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/f/b/2/fb2bcf0b78c36832c91d064e9a3149c3f0411d86.jpeg)

controls

 ![333298-control.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/0/6/7/067070c83d68fa454117ec4e622ff49fbc29c615.png)
