- Home /
Question by
orangeflame · Aug 11, 2015 at 11:31 PM ·
androidguivelocityrepeatbutton
Android: GUI.RepeatButton only working when I lift my finger
Okay so I'm making a game where you can push a button to move left and push another to go right. I'm doing this by having a GUI.RepeatButton that moves the player so long as the button is held down. Well nothing happens on my android device until I release the button and it just moves a little bit because I am hard setting the velocity. This does work when I tested this on PC using a mouse. Example:
if (GUI.RepeatButton (buttonRect, "Right")) { transform.GetComponent ().velocity = transform.forward * movementForce;
}
Comment
Your answer
Follow this Question
Related Questions
Unity 5 GUI crashes android 2 Answers
Android Button Screen 1 Answer
Problem with multi touch 1 Answer
Store/Stack Items 0 Answers
Does GUI stays on the same place no mather the device? 0 Answers