The mouse Intput is VERY jittery again.

Before I rant, did I overlook anything?

Getting input:

        var lookVector = new float2(MyInput.actions.Main.Look.ReadValue<Vector2>());

        jobHandle = Entities.ForEach((ref LookInput lookInput) =>
        {
            lookInput.Vector = lookVector;
        }).WithName("LookInput").Schedule(jobHandle);

Applying rotation:

        var rotations = GetComponentDataFromEntity<Rotation>(false);
        handle = Entities.ForEach((ref Rotation rotation, in LookRotation lookRotation, in LookInput input) =>
        {
            rotation.Value = math.mul(rotation.Value, quaternion.Euler(-input.Vector.y * lookRotation.Rate * deltaTime, 0f, 0f));
            rotations[lookRotation.YawEntity] = new Rotation
            {
                Value = math.mul(rotations[lookRotation.YawEntity].Value, quaternion.Euler(0f, input.Vector.x * lookRotation.Rate * deltaTime, 0f))
            };
        }).WithName("Look").WithNativeDisableContainerSafetyRestriction(rotations).Schedule(handle);

I am polling and applying deltaTime.

This system update is supposed to be at the same rate as normal Update, so it’s supposed to work.

EDIT: I’ll try to move delta time to the moment the input is taken.
EDIT: That didn’t help and the delta time is confirmed consistent between those systems.
EDIT: I’ll compare Unity.Core.Time.DeltaTime and UnityEngine.Time.deltaTime; Yes, it is consistent.

Okay, lol. That’s pretty interesting that so many people couldn’t figure this out for such a long time.

Multiple people pointed out that the “raw” mouse delta values are needed instead.

And there is a very simple reason for that. ReadValue() is not a value per second! It is a value per frame.

ReadValue() already acts as Time.DeltaTime as it is scaled by frame interval.

Now… Should that stay this way? It is rather confusing even for the developers of the system. Should mouse delta be in pixels per second? Would that make any sense? Probably not.

I also suspect that the mouseDelta is inconsistent with Time.deltaTime, so there still be some jitter.

Also might be good to have subpixel mouse input resolution.