When I run Remote on a iPhone 5 the touch behaviour is different to running the actual build on the same phone.
I suspect this happens because the Remote app seems not to be adapted for retina screen size. So the scope of x/y values it outputs are not as wide as they are on a native retina screen (480×320 as opposed to 1136 x 640 pixels).
Is this correct? And how can I fix this?
Not sure it helps, but here's the actual code:
void Update ()
{
if (Input.GetMouseButton(0) && isRotatableM)
{
if (Input.touchCount > 0)
{
theSpeedM = -Input.GetTouch(0).deltaPosition.x;
}
avgSpeedM = Mathf.Lerp(avgSpeedM, theSpeedM, Time.deltaTime * 5);
}
else
{
if (isRotatableM)
{
theSpeedM = avgSpeedM;
isRotatableM = false;
}
float i = Time.deltaTime * lerpSpeedM;
theSpeedM = Mathf.Lerp(theSpeedM, 0.0F, i);
}
}
↧