Search Unity

Cinemachine Collider and Blend Issues

Discussion in 'Cinemachine' started by Wolf_Bane, Oct 11, 2018.

  1. Wolf_Bane

    Wolf_Bane

    Joined:
    May 12, 2015
    Posts:
    1
    Currently working on a project where we have a single model that is being showcased on a turntable with multiple virtual cameras (from 3 different angles, namely Top-down with UI overlay, left, and right) placed to look at 6 different points of interest on the model, and we just turn off and on the correct virtual camera based on an enumerator ID and let the CM Brain handle blend given a pre-defined CinemachineBlenderSettings.

    The issue we're running into is that the blends will often clip through the model, despite the model having collision volumes (correctly layered and everything). Given some research, it seems like blending between cameras doesn't calculate collision, so I am at somewhat of a loss. I considered a ClearShot camera to find the most 'matching' child virtual camera (among the preset POV virtual cameras) and just blend to that one, but I am unsure. Any help is greatly appreciated.
     
  2. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    7,728
    You can give hints to the blender for interpolating the camera positions. By default, it's a linear blend which may bring the camera through the model. Try using cylindrical position. Set it for all the vcams.

    upload_2018-10-15_12-44-55.png
     
  3. h1ggs

    h1ggs

    Joined:
    Dec 21, 2017
    Posts:
    14
    I'm having the same issue as OP and changing blend hint to cylindrical position didn't help. My camera still traverses through the object when switching to a view on the opposite side. Is there a way I can have the camera zoom out when transitioning to another vcam?
     
  4. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    7,728
    Do you have a LookAt target set for the vcams? You need one for this to work.
     
  5. WeiWuDe

    WeiWuDe

    Joined:
    Nov 3, 2020
    Posts:
    26
    Hi Gregory,
    i have the same issue, i did the same as you mentioned, use the cylindrical Position instead of None, but my CVCam is still through the collider when blend, is there anythings eles i can do?
     
  6. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    7,728
    While the vcams themselves are prevented from being inside a collider, the interpolated blend between them can still pass through objects. There is no collision resolution logic for blends.
     
  7. MathiasSeverinTrackman

    MathiasSeverinTrackman

    Joined:
    Mar 1, 2021
    Posts:
    4