So I'm pretty stumped on how to get this totally perfect for the iPhone. Obviously with a keyboard you can just do FrontWheel.steerAngle = value * Input.GetAxis("Horizontal");
However I'm trying to work out how I can apply the same logic with touch. My touchright button is a guitexture, and works fine as below.
for (var touch: Touch in Input.touches)
{
// Turn Right
if(touch.phase == TouchPhase.Stationary && turnRightButton.HitTest (touch.position)){
TouchRightCount= 1;
}
else if(touch.phase == TouchPhase.Ended && turnRightButton.HitTest){
TouchRightCount= 0;
}
}
What would I need to do in order to get the same results as desktop onto iphone?
Help appreciated!
↧