1

so im very new to Unity. I make a 2D Plattformer and try to Zoom out when you Press 'Tab'.

I like to change the OrthographicSize from my VirtualCamera via script, but cant figur out how.. any ideas?

Camera follows the Player.

Thanks in Advance!

Wolf
  • 11
  • 2

1 Answers1

0

Got a solution!

using Cinemachine; //to use cinemachine

public CinemachineVirtualCamera vcam; //to assign cam

vcam.m_Lens.OrthographicSize = 20; //to access cam, Lens and then OrthograhicSize
avariant
  • 2,234
  • 5
  • 25
  • 33
Wolf
  • 11
  • 2