ACCELEROMETER Vibrations. GAME CAMERA

Hello! I started playing with the accelerometer, and there’s a problem.

When the camera is rotated with an accelerometer, vibrations (camera shake) occur when the motion is attenuated, and then continue at rest.

If the sensitivity is 1, then there is no vibration, everything is smooth.
Camera following speed is slow, not realistic.

If the sensitivity is> 1, there is vibration.
The more sensitivity, the more realistic the movement, but more vibrations.

I try in several ways, but the behavior is the same.
The gyroscope is not interested.

Task

Remove vibrations (vibrations), increasing sensitivity.

Camera movement

Orientation: Landscape.

Tilting the phone away from myself or toward myself turns the camera in the game up or down.

Tilting the phone to the left or right rotates the camera about the Z axis (while retaining the feeling that the ground in the game is always parallel to the floor in your room).

using UnityEngine;
using System.Collections;

public class AccelerometerCameraControl : MonoBehaviour 
{
public float sensitivityXZ = 9f;

private float rotationalAngleFactorXZ = -90f;
private Vector3 currentRotationXZ; 

void LateUpdate ()
{ 
Way2();
}

// Quaternion.Slerp
public void Way2()
{
currentRotationXZ.x = Input.acceleration.z * rotationalAngleFactorXZ;
currentRotationXZ.z = Input.acceleration.x * rotationalAngleFactorXZ;

transform.localRotation = Quaternion.Slerp(
transform.localRotation, 
Quaternion.Euler(currentRotationXZ), 
Time.deltaTime * sensitivityXZ);
}

// Math.Lerp
public void Way1()
{
currentRotationXZ.y = transform.localEulerAngles.y;
currentRotationXZ.x = Mathf.LerpAngle(
transform.localEulerAngles.x, 
Input.acceleration.z * rotationalAngleFactorXZ, 
sensitivityXZ * Time.deltaTime);

currentRotationXZ.z = Mathf.LerpAngle(
transform.localEulerAngles.z, 
Input.acceleration.x * rotationalAngleFactorXZ, 
sensitivityXZ * Time.deltaTime);

transform.localRotation = Quaternion.Euler(currentRotationXZ);
}
}

:comet: AR Camera ACCELEROMETER – NEW UNITY ASSET

When it comes to augmented reality, it is usually implied that the user of your game or application has a modern device.

Moreover, such a smartphone should not be from the budget class itself. We need a gyroscope, and even a higher OS version and so on.

In budget devices, there is an accelerometer sensor, which is not designed to implement augmented reality. More precisely, it does not provide enough data.

It turns out that such users will not be able to use the AR-application. But if you really, really want, then you can give them such a chance.

I have developed an AR camera for Unity using an accelerometer.
Researchers say that it works on 90% of devices. Enjoy