Here is my situation: I have a character with 2 buttons. One make it go to the right, the other one makes it go to the left. When i am pressing one button, it works fine, But when i press both buttons, it only registers the button pressed first. The reason for that is it is just registering the first touch position has moved, not that another finger touches the screen. Is there any way to go around this, or is it the device?
My code for moving is:
if (WalkingLeft) {
//transform.position.x -= spd;
anim.SetBool("Walking",true);
transform.localScale.x = -0.5;
spd = -0.1;
}
if (WalkingRight) {
//transform.position.x += spd;
anim.SetBool("Walking",true);
transform.localScale.x = 0.5;
spd = 0.1;
}
if ((!WalkingLeft && !WalkingRight) || (WalkingLeft && WalkingRight)) {
anim.SetBool("Walking",false);
spd = 0;
}
transform.position.x += spd;
All of that is inside of a FixedUpdate function.