Jerky / Stuttering transform

Hello!

I have problem to get smooth movement with transform. I have tried all kind of things past 3 months to fix this issue. I know pretty much problem is with deltaTime as I have read others have same kind of problems, but have no found solution for this problem. Here is one of codes I have used

using UnityEngine;
using System;
public class Move : MonoBehaviour
{
** public float speed;**
** void Update()**
** {**
__ transform.position -= Vector3.right * (speed * Time.deltaTime);__
** }**
}

So this is so very basic script that should work, but I see much jerkiness / stuttering on Android, PC and etc. Have also tried to cap framerate and so on. So if anyone know the solution for this problem please tell me! I am already thinking going back to code with Libgdx as I can’t get so easy thing to work with Unity. Thanks for your replies already!

What happens when you don’t use deltaTime?

For smooth movement you should use Vector3.Lerp() method - Unity - Scripting API: Vector3.Lerp

public class Move : MonoBehaviour
{
   public float speed;
   void Update()
   {
      transform.position = Vector3.Lerp(transform.position, Vector3.right, Time.deltaTime * speed);
   }
}

Still stuttering with lerp. I haven’t tried without deltaTime as It would be pointless. Here is guy with same kind of problem http://forum.unity3d.com/threads/203552-Stuttering-issue-on-Unity-4-2 and I have seen other with same problem as me!

Can you reproduce it in an empty project or does it only happen in your actual project? If you could also show a screenshot of you Unity windows including the hierarchy and so on may help.

I have tried many times with empty project. Only in scene is cube with script and camera. Still I’m seeing the lag

I would expect somewhere in your code you are doing an expensive/slow computation that sometimes takes more than a frame to complete.

Could you make a video showing the issue?

I’m mainly trying with Android as we are making / publishing game for it! We have tried many tablets / phones with single cube. I think I could make Android build if needed!

is your camera stationary or does it move or follows the cube? If its following than try to update your camera position inside LateUpdate()

The camera is stationary