- Home /
Camera shaking when moving around motionless objects
Title. Here's a video showing the problem
I've been trying quite a few solutions: using a script that changes camera's position to player one (doesn't change anything) this was the script:
public class PlayerFollow : MonoBehaviour {
public Transform player;
public Vector3 offset = new Vector3(0,1,0);
void Update () {
transform.position = player.position + offset;
}
}
then I tried samnm19's answer on another related post which is adding rigidbody to the camera and freeze it's rotation on all axis (didn't work neither) also tried to edit physics settings but it didn't fix the problem.
Does anybody have an idea on how to fix this ?
EDIT: Also I'm running the game at 144fps with a 144Hz monitor so the frames refresh rate has nothing to do with this problem.
EDIT2: Tryed disabling/enabling character controller and also tried using voids Fixed/Late update instead of Update, didn't fix the problem
Are you using physics at all? If so, you're going to have a bad time moving with Update().
wdy mean by using physics at all ? using rigidbody and stuffs like that ? if so then no
Have you tried fixing the camera above your object and seeing if your player is the thing jittering? We can't see how it's controlled, but the camera is just following its position.
I'm not sure but I think it is, it's like it is just jumping from a position to another with a very little step like 0.01 units but still noticable and I guess this cause shaking when the camera moves on the same pattern
so what should I do to make my movements smoother ? shoud I use physics to move my char ins$$anonymous$$d of the char controller which use some formulas using time.deltaTime
Can you link the character controller's code that's responsible for the movement?
Answer by Vylax · Apr 26, 2018 at 09:09 PM
So after figuring out that it wasn't due to the camera but to the character controller, I tryed out some stuff and figured out that I had to disable the "Use Fixed Update" option and then everything was way smoother.
Your answer
Follow this Question
Related Questions
How to create a panning, rotating camera with Cinemachine Freelook camera? 0 Answers
Unity - Dancing Ball World camera following and rotating system 1 Answer
Would anyone teach me how to create camera movement and look controls? 2 Answers
Cinemachine input axis camera movement,cinemachine input axis control with script 1 Answer
I only rotated X, but Y and Z are shifting as well when I play the game. 1 Answer