Simluate GetAxis like movement with Dpad
Hello,
I am seeking a way to make UI Buttons operate like a D-Pad and buttons.
Similar to this post which has helped me get the buttons to hook into the player object. Great!
http://answers.unity3d.com/questions/1132554/how-to-move-player-with-getaxis-and-ui-buttons.html
However, this has only worked successfully in part, except for the actual movement of the player. The button will increment the Horizontal or Vertical value by +/-1 depending on the axis and direction.
Given values used in Input Manager.
Gravity: 2 Dead: 0.001 Sensitivity: 3 Snap: True
How do i calculate the h and v to be used with a UI Button?
Interaction works like this..... User -> Button -> PlayerController
Values taken from Input$$anonymous$$anager for $$anonymous$$eyboard Inputs, we want to replicate this feel with the UI Buttons.
Your answer
![](https://koobas.hobune.stream/wayback/20220612081229im_/https://answers.unity.com/themes/thub/images/avi.jpg)