I found a solution that works for my program
Problem of stuttering FPS Camera
Hi,
First, i'm sorry if it's not the right place to post that. I read dozens of post that either didn't had anything to do with my problem or the solution given didn't work, but if there's a link that you think might help i'll gladly take a look to it.
I have a problem with the standard assets FPS RigidBody controller. When you move and rotate the character/camera you see some stuttering.
So i tried to passed the rotation of the camera from FixedUpdate to Update. It solved some little stuttering problem (like in some cases if you stop moving the camera would not stop and stutter) but not when moving. If i move and don't rotate the character/camera everything's fine and if i rotate the character/camera but do not move again no stutter.
And i didn't find any fix for that. Tried to put the camera apart and interpolate its movement but didn't fix it. My V-Sync is off. And moving the movement of the character in the Update don't fix that stutter and make another stutter appear. (probably beacause i'm moving too quickly compared to the physic calculation)
Answer by ryschawy · Feb 16, 2017 at 03:07 PM
Hi, I'm facing the same issues here. The more I think about the problem the more I think the issue is the physically incorrect path the character is following. The implementation moves the character along a linear path between two frames. Ideally it should move it along an arc. This has nothing to do with smoothing. It's that the camera ends up in a position relative to the surrounding world that does not match the otherwise correct viewing angle. So, reducing the amount of movement or rotation will result in a less incorrect path. The result is the effect gets less visible. Also increasing the framerate will help to get a more correct path, as the linear movement error will reduce. A best solution would be to calculate the correct path of the character / camera based on arc movement, e.g. the rotation speed should influence the calculation of the next frame character position. There must be some standard way of doing this. Please share a link if somebody knows a paper or code snipped :-)
Hi, Thanks to your reply i remembered that question (my bad for not checking unanswered questions).
I do not really use the direct script of unity, but exactly the same code so i suppose my solution could work.
and in fact i just replaced the line:
character.localRotation = m_CharacterTargetRot;
By the following:
m_rigidbody.$$anonymous$$oveRotation(m_CharacterTargetRot);
I don't really understand everything of why it works but i suppose your explanation is correct.