- Home /
Cinemachine jumping around - how can I stop it?
I am using cinemachine in one of my projects, and I keep running in the issue that the camera jumps to center on the player from time to time, and I have no idea why.
This person seems to have the same issue, but no answer was posted: https://www.reddit.com/r/Unity3D/comments/9ubpur/cinemachine_camera_jumps_around_how_to_fix/
Here are my camera settings: I tried to add a cinemachine collider and tell it to avoid nothing, but it didn't fix the issue.
The jump can be seen here
Any idea how this could be fixed?
Answer by RedHillbilly · May 09, 2019 at 01:47 PM
Okay, I think I found the bug: whenever my object to follow was hitting the lower dead zone, the camera was re-centering on x. Is this intended behavior? seems like a bug to me.
Anyway, after some trial and error I found a solution: set soft zone to unlimited and play with the damping: set it to 0 for y to simulate a hard bound, and to a low value for x such that it re-centers nicely. Seems to be working, but also seems like a hack. The hard bound should be working too.
Thanks for updating with at least some kind of solution! Did you ever figure out any other solution that allows you to have a finite soft zone? I'm having the same issue with my project.
No sorry, didn't find another way of achieving this. Let me know if you come up with something less hacky.
Answer by FrickinSilly · Jan 23 at 03:07 PM
I stumbled across this question (and the reddit question mentioned by the OP) and tried the Best Answer which unfortunately didn't work in my case.
Like the OP, I had a single VirtualCamera, no custom code, and the polygon collider was a square shape. Yet every time my character crossed the halfway point going up or down, the camera jumped in an awful way.
I fiddled with every possible field on the CinemachineVirtualCamera, the Confiner, the Camera itself, to know avail.
SOLUTION THAT WORKED FOR ME: My polygon collider, while square-ish, was not perfectly square. I ended up copying and pasting the point values of each X and Y of the corners to ensure the polygon was perfectly square. My values were off by an order of ~0.01 units (compared to the length of the squares of ~10 units).
I guess having a slightly obtuse or slightly acute angle (we're talking 89.9 or 90.1 degrees) is enough to confuse the CinemachineVirtualCamera.
Your answer
![](https://koobas.hobune.stream/wayback/20220612201000im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Mouse Position returns wired values with Cinemachine2D 1 Answer
Main Camera child under player, causes flip 3 Answers
(2D) Camera negative boundaries 0 Answers
Camera wrapping 0 Answers