Hi guys,
I have been trying for a few days to get Unity to produce smooth movement using a fixed Orthographic (i.e 2d!) camera.
In an effort to work out what is occurring, I have created a new project with just a single untextured cube… no matter what approach I take to moving the cube (which of course appears as a square with an Ortho camera) the movement from one side of the screen to the other is jerky.
I am deploying to iPhone, but this behaviour happens in the editor as well as on two different iPhones.
Note that neither of the iPhones (a 3GS and a 4) have no other applications running in the background!
This jerkiness appears almost rhythmic on the iPhones, but more chaotic in the editor. The jerkiness seems about twice as bad on the iPhone 3GS… i assume this is because the iPhone 4 having double the resolution thus each ‘jerk’ movement appears half as large.
I have tried adjusting various project settings, and enabling vSync, but to no avail.
I have four tried different approaches to movement:
gameObject.transform.position.x += Time.deltaTime in the Update method;
gameObject.transform.position.x += Time.deltaTime in the FixedUpdate method;
gameObject.transform.position.x += 0.02 in the FixedUpdate method;
…and finally using Vector3.Lerp().
None of these give smooth movement.
Please could anyone tell me how to achieve smooth 2d movement using a fixed Orthographic camera (although the same behaviour also occurs with a Perspective camera)… is it even possible with Unity?
Many thanks…