i have a gameobject that moves left to right but Pressing right and left arrow. it works fine on pc, however now i want to do the same in mobile, however with two buttons left and right. On the pc i had the script.
void Update()
{
float move = Input.GetAxisRaw("Horizontal");
MyRigitbody.velocity = new Vector2(move * 6, 0f);
}
The object moved as i hold down right or left arrow, how can i do the same with buttons? i am trying to use crossplatforminput with two buttons right and left, however it only has crossplatforminput.getbuttondown(“Left”), it does not have the same system as inputaxisraw, so i am unable to move object with velocity every time in press or hold left and right button any suggestion?