Input Delay Fullscreen Mode

Hey guys, again thank you to everyone who takes the time to look over this issue.

When I test my game in the test game window, everything runs fine and smooth.

Although when I run the game window in fullscreen there is a good 1-2 second delay once i hit a key.

I’ve lowered the quality drastically, turned off v-sync, tried playing a build version, as well as tried removing elements.

The only thing that seems to remove this lag is playing the game in a square resolution. Once it goes wide the input delay hits hard.

Now, I am a novice and am sure that my ignorance is blinding me from an obvious answer.

Does anyone have any insight on this?

below is my movement script, as well as my camera script.

using UnityEngine;

public class PlayerMovementController : MonoBehaviour
{
    [SerializeField] private float speed;

    [SerializeField] private float sprintSpeed;

    private Rigidbody rb;

    private void Start()
    {
        rb = GetComponent<Rigidbody>();
    }

    private void FixedUpdate()
    {
        Move();

        speed = 10;

        if (Input.GetKey(KeyCode.LeftShift))
        {
            speed = 15;
        }
    }

    private void Move()
    {
        float hAxis = Input.GetAxisRaw("Horizontal");

        float vAxis = Input.GetAxisRaw("Vertical");

        Vector3 movement = new Vector3(hAxis, 0, vAxis) * speed * Time.fixedDeltaTime;

        Vector3 newPosition = rb.position + rb.transform.TransformDirection(movement);

        rb.MovePosition(newPosition);
    }

I think you’ll have to look at the profiler to determine whats causing your slowdown. At a glance at least, your code doesn’t seem to have anything which will cause slowdown. Might be a hardware issue, having significant performance change based on screen Aspect Ratio is really weird IMO.

1 Like

Thanks for the input.

Yeah, it’s very strange to me as well.

I’ll give your suggestion a try.