After looking over the iphone touch system, it looked really simple, but after trying to apply it, nothing seems to make sense.
my code goes something like this:
for (var touch : iPhoneTouch in iPhoneInput.touches)
{
joyTouch = touch;
}
if (joyTouch.phase.Began)
//save the initial joystick spot
if (joyTouch.phase.Moved || joyTouch.phase.Stationary)
//save where the joystick is now
if (joyTouch.phase.Ended)
//save that the joystick is not in use
Right now, im trying to make a joystick. To do this i really need to use the iPhoneTouch.phase .
After using debug.Log, i’ve found out that within the for loop, stationary, moved, and ended are always true if there is a finger touching the screen and began is never true. If it’s outside of the for loop, stationary, moved, and ended are always true, even before a finger has ever touched the screen even at the start of the game.
I’m confused, can someone help me out? thanks.