- Home /
Laggy Player Movement
Hi. I am working on a 2d mobile game. I am using the rigidbody 2d for the movement:
rb.velocity = new Vector2(Speed , rb.velocity.y); // Speed = 9f
But if i start the game (whether in the editor or built as .apk or .exe) the movement is not smooth. It doesn't look smooth it looks very laggy [Video] ... can s.o help me? Thanks
link takes me to a download page, not a video. Does this same issue occur if you create a new project? (Perhaps you have something else going on in the program, that's slowing i down?)
Is your camera moving to track the rigidbody? And, if so, does it move in sync with the same time step? (i.e. Are you moving the camera in FixedUpdate?)
I am using $$anonymous$$athf.SmoothDamp to have a smooth camera movement.
i mean the camera is following the player (i am using $$anonymous$$athf.SmoothDamp for that)
Answer by RageKit · Jul 14, 2016 at 04:36 PM
You might want to check the Fixed timestep in the inputmanager https://docs.unity3d.com/Manual/class-TimeManager.html
Your answer