Gyroscope controller jittering when holding phone still

I have here a simplified version of my gyro-controlled camera with a sensitivity modification (a side effect of increasing sensitivity is that the jitteriness is exacerbated).
public class GyroControl : MonoBehaviour

    private Transform _rawGyroRotation;
    Vector3 gyroAdjust;
    [SerializeField] private float _smoothing = 0.1f;

    void Start()
        Input.gyro.enabled = true;
        Application.targetFrameRate = 60;

        _rawGyroRotation = new GameObject("GyroRaw").transform;
        _rawGyroRotation.position = transform.position;
        _rawGyroRotation.rotation = transform.rotation;


    private void Update()
        _rawGyroRotation.rotation = Input.gyro.attitude;

        gyroAdjust = _rawGyroRotation.rotation.eulerAngles * 2; //increase rotation sensitivity
        transform.rotation = Quaternion.Euler(gyroAdjust);

        transform.rotation = Quaternion.Slerp(transform.rotation, _rawGyroRotation.rotation, _smoothing);


When in motion, the jittering isn’t noticeable. But when you hold the phone still, there’s what I assume to be just analogue noise that causes jittering. I would really appreciate any help or advice on how to add a filter or something to reduce the jittering for this kind of controller.


I will only suggest that you use Lerp instead of SLerp, which may give you better result in general.
some math solution like “average”…etc will also help, but it will just add more delay in reaction.

If you are testing on Android Phone, the jittering could be just sensors problem.

We’ve been testing many devices in our previous projects, and below is what we found.

iPhone 6s, xs, 12 pro: very stable gyro, and accurate!

iPad: less stable, will shift few angles if you keep turning 360 by time.

Samsung 9s: drifting in hell in some magnetic area or near some old computers…

Xiaomi: drifting by time, when you are outdoor or nearby traffic light for example.

Pixel 3: seems fine in most of cases, but still not stable like apple iphones.

Huawei: better than samsung, but still not accurate…

So far, seems only apple’s gyro on iphone is the most stable.