Hey there.
So i have these UIImageButtons, where i can move my Character through the Level. The Level and the character have some physics (FarseerUnity-Plugin-Physics, static Level, dynamic Character). With the Buttons i am controlling the dynamic Body of the Character.
So, for some testing i also have within an Update()-Method same actions, but only with Keyboard-Events, like this:
if(Input.GetKeyDown(KeyCode.RightArrow))
{
float velocityScale = 2.5f;
velocity.Y = KnightShape.LinearVelocity.Y;
velocity.X = velocityScale * m_normal.X;
KnightShape.LinearVelocity = velocity;
}
So, my problem is, that via Touch the results aren't the same like on the keyboard. When i press the right arrow and hold it, the character moves all the way to the right till i release my finger from the RightArrow-Key. I tried every meaningful nGUI-Event (OnClick, OnPress etc.), but nothing worked, he just moves with the VelocityScale to the right and stops, so i have to press/click the button all the time to get the character moving.
What am i doing wrong?