Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Convert CinemachineConfiner to CinemachineConfiner2D?

Discussion in 'Cinemachine' started by Morkdel, Dec 17, 2020.

  1. Morkdel

    Morkdel

    Joined:
    Nov 27, 2020
    Posts:
    2
    The new one is more reliable and we really like the corner damping feature! We would like to upgrade our old confiners to the new one in our project.
    Is there a script that converts CinemachineConfiner to the new CinemachineConfiner2D?
     
  2. gaborkb

    gaborkb

    Unity Technologies

    Joined:
    Nov 7, 2019
    Posts:
    856
    What a coincident! :) We were just discussing this. :)

    I attached a simple script that you can use until we have something more formal and clean.

    Notes:
    This script was written to check if there are any problems with the conversion, but should work for you. To use this script, you need to attach it to a gameobject in your scene, then click convert. It will print a log of which vcams were converted/failed to convert.
    The script will only convert CinemachineConfiner 2D mode to CinemachineConfiner2D. The script only transfers the bounding shape, but does not convert the Damping parameter, because CinemachineConfiner 2D mode's damping is different from CinemachineConfiner2D's damping.
     

    Attached Files:

    Last edited: Dec 17, 2020
    marc_tanenbaum, Gregoryl and Morkdel like this.
  3. Morkdel

    Morkdel

    Joined:
    Nov 27, 2020
    Posts:
    2
    Thanks!