hi,
i have a super simple scene 7 boxes , 1 sphere and all have mobile / unlit shader , no light in scene.
here is my script for controlling a sphere.
using UnityEngine;
using System.Collections;
public class PlayerControllerTouch : MonoBehaviour {
public float speed;
void Update() {
if (Input.touchCount > 0){
transform.localScale += new Vector3 (0.0f, 0.0f, 0.0f);
}else {
transform.localScale += new Vector3 (0.0035f, 0.0f, 0.0035f);
}
if (Input.touchCount > 0 && Input.GetTouch(0).phase == TouchPhase.Moved) {
Vector2 touchDeltaPosition = Input.GetTouch(0).deltaPosition;
transform.Translate(touchDeltaPosition.x * speed,0,touchDeltaPosition.y * speed);
}
}
}
from a ortograhpic camera from top i’m controlling a sphere with my touch , this simple scene is not smooth on htc m7 , galaxsy note3 even note 4,
i have htc m8 and game flows very smooth.
all i’m doing with script if i stop touching screen i start scaling the sphere
and move sphere with touch.
any idea that cause lag?
thank you.