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. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

Question Virtual Camera Ortho Size locked at runtime in 2D

Discussion in 'Cinemachine' started by Djohxnn, Mar 13, 2023.

  1. Djohxnn

    Djohxnn

    Joined:
    Aug 7, 2019
    Posts:
    3
    Hello, I just wanted to do a camera zoom in-game so I tried to change the virtual camera lens ortho size but it just won't change and is locked, I tried with a script using a simple : vcam.m_Lens.OrthographicSize = 3.0f
    And even tried manually changing in the inspector, it won't move. At runtime.
    Have any idea why? or maybe there is a better solution to make a zoom in 2D using ortho? please
     
  2. Djohxnn

    Djohxnn

    Joined:
    Aug 7, 2019
    Posts:
    3
    I just find why, it was the culling Mode of the animator attached to the vcam, Always animate was locking the ortho size apparently, even when the vcam was not animating, Cull update transforms fixed it ;) I should let the post up for someone else with the same problem I guess