Search Unity

  1. We are migrating the Unity Forums to Unity Discussions. On July 12, the Unity Forums will become read-only. On July 15, Unity Discussions will become read-only until July 18, when the new design and the migrated forum contents will go live. Read our full announcement for more information and let us know if you have any questions.

Question How to "overwrite" Cinemachine 2D using code?

Discussion in 'Editor & General Support' started by nibovim760, Nov 28, 2023.

  1. nibovim760


    Nov 27, 2023
    I am working on a 2D platformer.

    I have set the Soft zone n Deadzone for my Player-character. But I am not happy with the Camera mvmt when the Player falls from a very high place and jumps up from lower place onto a higher place. But whenever after the Player fell from a high place, the camera seems to be in "displacement".

    I want the Camera to re-center onto the character after the fall or the jump, so it is like move the position of the Camera when the character is grounded.
    tutuapp Vidmate
    Can you please point me the way to solve this?
    Last edited: Nov 30, 2023
  2. CodeSmile


    Apr 10, 2014
    You can change the soft zone to be more wide than high. Try playing with Cinemachine settings, pretty sure you don't need to code any of this. At most you may need to switch between two Cinemachine virtual cameras, each with different settings.