- Home /
Too subjective and argumentative
My Cinemachine Freelook camera is jittering
Hi there,
I'm working on a 3D game and facing an issue while using a freelook cinemachine camera.
Basically, I made it look at and follow my character, but at some point, it just starts jittering for no obvious reason. Even though my character is just standing in Idle pose, on a flat surface. By jittering , I mean my 3D world is shaking, and my character is stable.
I tried several things, such as changing the Update Method from "SmartUpdate" to "LateUpdate" or "FixedUpdate", nothing works. I then tried to deactivate my PlayerMovement script, which of course solves the issue since my camera is looking at a static character. But I don't understand why this camera is shaking like that when my character is moving.
I also noticed that when I deactivate the "Cinemachine Brain" component on my main camera, then the world is stable, but my character is now shaking.
I wish I could show you a video, a screenshot wouldn't help here.
Anyone could give me a hand on this one ? I'm using rayCast to figure out whether I'm grounded or not. Maybe that's the problem.
Thanks in advance
Answer by Nicoroots · Jan 15, 2019 at 04:18 PM
I solved the issue by adjusting some values.
:)
I've been having the same problem, what values exactly did you adjust?
Hey,
Well it"s very specific to my code actually. But I'll explain it anyway, perhaps it will help you. So basically, my character is using raycast in order to know whether I'm grounded or not. This raycast uses a DistanceToGround float value.
So the issue I was having came from 2 things : 1) my DistanceToGround value was to low, I fixed the issue by simply raising it a bit 2) The floor my character is walking on was not so flat (a beach with some rocks popping from the floor here and there). After watching/reading some stuff about game design, you want to have a relatively flat floor, so you charactehr don't "stutter" or misstep.
So basically, just try to have a smooth transitions between even small elevations to avoid this problem.
Hope it help !!
Follow this Question
Related Questions
How to make camera position relative to a specific target. 1 Answer
Weird Glitching With Camera 0 Answers
Camera doesn't render sprites properly on 2D game 0 Answers
[HELP] How to fix camera jittering? 0 Answers
Camera following two objects 0 Answers