So I came across this problem when I made some level. In one level I make it shaped like a flipped “L” and when I test the level the camera snap to the corner(the one with diagonal line) whenever I go near it.
Hi,
Have you tried to have the cinemachine update in the LateUpdate method? See the Cinemachine Brain component.
Hi Nina.
I tried to change the update method for the Cinemachine Brain in the main camera to LateUpdate as you suggested but it still hasn’t fixed it.
Correct me if I’m wrong, but is this the one that you meant?
Could your problem be similar to this? Test the suggestions.
Reddit is banned in my country so I have to look for some VPN first.
After I look at the post on Reddit, I think it might be similar? (I’m not really sure).
The way I see it, his camera seems to snap on the corner but it still follows the player. In my case, the camera is like sticking to the corner first. Because on my camera, even though the player is outside of the soft zone it doesn’t even follow it until I move away from the corner, and then it will snap. (Sry English is not my first language, I hope it makes sense).
The suggestions on Reddit are to add a script to confine the Main Camera (Which I’m not quite sure what it means or how to do it) and add more damping. I’ve tried with max damping (20 on all axis) and the camera is still snapping on the corner.
I’ve been using damping anyway so I don’t see how it helps. If anything, when the damping is 0 it actually made it stick on the corner just a moment (similar to the Reddit post) and it sticks longer when I add the damping to 20. But either way, it will still snap when the camera moves away from the corner.
Which confiner did you use? According to this thread, the Unity developers added an improved version, the CinemachineConfiner2D. From what I read, there does not seem to be any solution for the problem you are experiencing, so, I’m afraid you’ll have to experiment around.
Maybe you could try to make the polygon collider larger so the camera does not move too close to the edge when following the player.
I’m Using CinemachineConfiner as shown on the course (the cinemachine confiner part).
Changing the extension to CinemachineConfiner2D removes the problem completely (snapping/sticking to corner).
I’ve tested it again on all the cameras for each level and it seems like there is no issue.
Thanks for the help Nina
This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.