Search Unity

  1. If you have experience with import & exporting custom (.unitypackage) packages, please help complete a survey (open until May 15, 2024).
    Dismiss Notice
  2. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice

Cinemachine Camera can see through the ground/terrain

Discussion in 'Cinemachine' started by anthony-pinskey, Oct 15, 2018.

  1. anthony-pinskey

    anthony-pinskey

    Joined:
    Dec 23, 2016
    Posts:
    17
    Hi There!

    I noticed with my Free Look Camera that it can easily see through the ground/terrain when the player moves the camera down with the joystick while orbiting around. I tried setting the Camera Radius to around 2-3 but it still can clip through. I have my strategy set to Pull Camera forward.

    Here is a screenshot of my collider settings.



    Is there a way natively to achieve this within Cinemachine so that the camera can't go through objects/terrain?

    Thank you in advance!
     
  2. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    7,745
    You don't need such a huge camera radius. Turn it way down.
    First thing to try is to turn off the damping settings in the collider. Make it work naively first, then add sophistication.
    Reduce the minimum distance from target. Turn it way down.
    Does it still happen?
     
    grimwater likes this.
  3. anthony-pinskey

    anthony-pinskey

    Joined:
    Dec 23, 2016
    Posts:
    17
    Thanks Gregoryl, I did as you said and the camera still can see through the ground/terrain when it is pulled to the bottom of the rig.
     
  4. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    7,745
    Can you show me some pictures? Inspectors, hierarchies, scene view from the side with the vcam selected, clearly illustrating the problem? Don't forget the inspector for the terrain too.
     
  5. anthony-pinskey

    anthony-pinskey

    Joined:
    Dec 23, 2016
    Posts:
    17
    Hi Gregoryl. During the process of prepping pictures for you I noticed that my Follow target was some reason going underneath the character into the terrain! After I lifted the Follow object up into an appropriate position everything worked as expected with the collider system.

    Thanks again!
     
    Gregoryl likes this.
  6. potorium

    potorium

    Joined:
    Dec 29, 2019
    Posts:
    2
    Your are stars! Thanks both for this.