Search Unity

Weird behaviour of freelook cinemachine

Discussion in 'Cinemachine' started by overpowerogue, Jun 20, 2020.

  1. overpowerogue

    overpowerogue

    Joined:
    Oct 25, 2019
    Posts:
    29
    The Freelook Camera is aiming and following the character. However, when the character speed is increased, is start to jittering (something like teleport a bit to the forward position and return back ). I found out that If I disable the avoid obstacle in cinemachine Collider, everything work fine.

    The problem is recorded in video and will be showed in the link
    https://drive.google.com/file/d/19VlFYgc5e7SbrW2LIXFoQHG8jGIyqVGG/view?usp=sharing

    Any idea of what is happening?
     
  2. overpowerogue

    overpowerogue

    Joined:
    Oct 25, 2019
    Posts:
    29
  3. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    7,711
    It's very hard to tell from your video what the problem is.
    Can you show the inspector for the vcam, including the CM collider?
    Also the inspector for the player, and a section of the hierarchy showing the vcam, the main camera, and the player.
     
  4. overpowerogue

    overpowerogue

    Joined:
    Oct 25, 2019
    Posts:
    29
    CMCollider.PNG FreeLookIns!.PNG FreeLookINs2.PNG FreeLookIns3.PNG FreeLookIns4.PNG
     
  5. overpowerogue

    overpowerogue

    Joined:
    Oct 25, 2019
    Posts:
    29
    And this is the Hierachy. The "FollowPoint" at Look at and Follow is a children of my "MainCharacter"
    Hierachy.PNG
     
  6. MlleBun

    MlleBun

    Joined:
    Sep 19, 2017
    Posts:
    163
    Hi @overpowerogue, could you post a video ont the result you want to achieve (by disabling the avoid obstacle in cinemachine collider as you said) ?
     
  7. overpowerogue

    overpowerogue

    Joined:
    Oct 25, 2019
    Posts:
    29
    I just want the camera to follow the character, thats it. But the camera keep on jittering front and back when the character speed increased
     
  8. MlleBun

    MlleBun

    Joined:
    Sep 19, 2017
    Posts:
    163
    Actually, the camera is following a locator that is parented to your player. So a couple of checks you could make :
    • Check if the player is not glitching in position while walking, specially during this transition. Where is the Follow Point during this transition? Is it "moving" back and fort or is it at a perfectly fixed position relative to your MainCharacter ? Try to debug its position versus the Camera position in Scene mode.
    • Try to deactivate the CM collision. The Freelook might collide with the player?
    • Remove all damping values for your tests.
     
    Gregoryl likes this.
  9. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    7,711
    I'm wondering whether the collider is detecting the MainCharacter itself as an obstacle. The collider has no way of knowing that the geometry inside your MainCharacter should be ignored - unless you tell it.

    upload_2020-7-2_16-39-17.png

    If you tag your player (and all its children) and set IgnoreTag to that tag, that's one way to do it. Another way is to increase the MinimumDistanceFromTarget setting to be larger than the radius of your character. Your current value of 0.1 is quite small.
     
    soggy_garlic_bread likes this.