RootMotion with ThirdPersonCamera

Hello. There is character with rootmotion animations. I’ve wrote camera script which get character y axis rotation and update camera position based on this. (using rotation matrix). it works, but even when character is running or walking forward his y rotation value varies in small spaces…and camera repeats all this movements. If charater using idle animation and I changing Y by hands, then no problems… but when y changing by animation, i have this fault. So, I have no idea how fix it

Maybe try using SmoothDamp to help smooth out the sudden jumps in differences?