Hello,
I was testing the performance of the Block Breaker game on different Android devices. It runs buttery smooth on my laptop and my OnePlus 3T android device, but it has terrible stuttering in my Galaxy Tab A and Galaxy J7. Please help me understand how I can fix the issue. I have tried the following fixes:
-
Turning on Interpolate on Rigidbody 2D of the Ball gameobject.
-
Setting the ball velocity inside FixedUpdate()
private void FixedUpdate()
{
myRigidBody2D.velocity = myRigidBody2D.velocity.normalized * ballSpeed;
} -
Using Time.deltaTime for motion of both Paddle and Ball.
-
Changing fixedDeltaTime to 0.005.
Please note that I had initially designed the game in (1920x1080) 16:9 aspect ratio and using the following function to Scale the Camera on different devices:
public void ScreenAdjust()
{
Camera.main.aspect = 1920f / 1080f;
}
Could this be the reason for stuttering? If yes, what could be the possible solution?