Using C# to interact with virtual camera.

Joseph Hibbs
Jul 12, 2023

--

First, I created a way to switch between 2 objects as the look at component.

I created an array of game object and use R key to increase the index value of the objects while inside of update it continues to look at that index valued game object, and if I am greater than or equal to the array length then I reset back to zero.

Second, I changed the Field of View

Whenever the space key is called, I get the virtual camera Lens field of view variable and subtract it by 20, and if it is less than 20 I have it brought back to 60.

--

--