So basically like this gif looks like
https://giphy.com/gifs/l0MYrjDwyvzLmj7Ms
^ left box represents gyroscope, right box represents player camera
here is the working code with eulerAngles,
gyroRotation = Input.gyro.attitude;
gyroRotation = Vector3.SlerpUnclamped(previousGyroscopeRotation, gyroRotation, fDamping * Time.deltaTime);
deltaRotation = (previousGyroscopeRotation - gyroRotation);
finalRotation = finalRotation - deltaRotation;
if (finalRotation.x != 0)
finalRotation.x = Mathf.LerpUnclamped(finalRotation.x, 0, 1 * Time.deltaTime);
if (finalRotation.y != 0)
finalRotation.y = Mathf.LerpUnclamped(finalRotation.y, 0, 1 * Time.deltaTime);
if (finalRotation.z != 0)
finalRotation.z = Mathf.LerpUnclamped(finalRotation.z, 0, 1 * Time.deltaTime);
transform.rotation = Quaternion.Slerp(transform.rotation, Quaternion.Euler(finalRotation), Time.deltaTime);
previousGyroscopeRotation = gyroRotation;
(but because of angle problems (ie: jumping from 350˙ to 10´ instead of 370)) internet suggested i use Quaternions, but have no idea how to achieve the same effect
transform.rotation = Quaternion.Slerp(transform.rotation, Input.gyro.attitude, Time.deltaTime);
transform.rotation = Quaternion.Slerp(transform.rotation, zeroPosition, Time.deltaTime);
this is the peak of my skills with Quaternions, if someone could shed some light on how to achieve this as simply as possible