Hi,
I am making a simple game like Curve Fever. I have simple scene with few GameObjects and one dot which is moving linearly. The problem is that the movement is not smooth - only on very powerful devices which is weird because there is not much in the scene. On my phone i can see little lags, background is “jumping”.
I tried many things:
- using Translate/MoveTowards/Lerp in different combinations
- using Update/FixedUpdate/LateUpdate also with decreasing time between FixedUpdate calls
- changing quality settings like Vsync
- removing everything from scene (like canvas), only moving object was active
- even I was testing with animation changing the position of object
So do you have any ideas what is wrong? Game was tested on many devices and the problem is repeating.
Object has Rigibody2D (kinematic) and circle collider.
Edit:
Current code:
void FixedUpdate()
{
transform.Translate(Vector2.up * speed * Time.fixedDeltaTime, Space.Self);
if (direction != 0)
{
rotationSpeed = 2 * speed * radius;
transform.Rotate(Vector3.forward * -direction * rotationSpeed * Time.fixedDeltaTime);
}
if (isAccelerating)
{
speed += speedIncrease * Time.fixedDeltaTime;
EndlessModeGameManager.instance.SetTimerValue(speed);
}
}
But as I said i tried many other versions and still only powerfull phones can handle it