Smooth movement impossible?

Hi people.

I have very basic sprites that i want to move down on the y axis smoothly. I can’t get smooth movement no matter what.

I first tried just subtracting from the transform.position.y value.

I then tried to subtract from the transform.position.y value with a value that is multiplied by time.deltaTime.

I have tried using Update() FixedUpdate(), time.deltaTime, time.fixedTime, .moveTowards, .Lerp.

I have turned VSync off which helped alot but its choppy.

I’ve even tried using rigid bodies with addForce.

Please for my sanity someone tell me how I can get smooth movement. All i want to do is move a flat cube on the y without it being choppy surely this is possible.

Thank you.

Unity runs at 30fps on iOS by default (choppy in my opinion). Have you tried 60fps ?
Application.targetFrameRate

@Laserlars yeah I’ve tried this too. Doesn’t fix the problem

By any chance have you tried running the same app in a different device/OS-version? You can also check if the garbage collector is producing spikes, in such case use object pools:

http://forum.unity3d.com/threads/137045-Garbage-Collection

@unimechanic yeah i’ve tired it on various devices and OS and its the same. I can’t understand it. It can be like a drum beat, for example, i could see the choppyiness being spaced out perfectly like a beat.

when it comes to smooth consistent movement I’ve gotten my best results so far using rigidbody forces in fixed updates and playing with my physics timestep values. and max timestep.

Answer is:

…Reduce your garbage collection. That’s the drumbeat.

thanks everyone for your help.

I have resorted to drastic measures. All other scripts in the game are turned off. I have three scripts and I’m adding force to the rigid bodies like so,

using UnityEngine;
using System.Collections;

public class test : MonoBehaviour 
{	
	public GameObject TileR1_C1, TileR1_C2, TileR1_C3, TileR1_C4;
	
	void FixedUpdate () 
	{
		TileR1_C1.rigidbody.AddTorque(0, -50, 0);
		TileR1_C2.rigidbody.AddTorque(0, -50, 0);
		TileR1_C3.rigidbody.AddTorque(0, -50, 0);
		TileR1_C4.rigidbody.AddTorque(0, -50, 0);

	}
}

I still get choppy movement. Can anyone see why?

As for the Garbage Collection I have removed all other scripts so it shouldn’t be a problem now, i think.

Thanks.