Hey guys. I’m new to the forums, but not new to the game of scripting or game-making, for that matter. Just have never really come down to post here.
Anyway, my issue is I’ve started using Orthello2D for designing a 2D game in Unity, but I am having trouble creating a smooth zoom effect.
I want to do this such that when the player tries to move higher up on the screen, the camera follows him up but also simultaneously zooms out to keep the ground of the level in view, and in much the same way, when the character starts descending to the original height, the camera moves down with it and zooms in as well. Hopefully that makes sense.
I’ve been using OT.view.zoom -= .01; as a mean of zooming out (and += for zooming in), but that produces choppy results. Also, it doesn’t keep the ground in view.
Does anyone have an idea of how to make the zooming in and out of the camera smooth, as well as perhaps some kind of algorithm or trick I should use to keep the ground of the level inside the camera’s view? I’m using zoom because I think that’s the way to go, but I’m up for suggestions.
SIDENOTE: I’m having an issue where when Unity is playing in the game view, the whole screen flickers and parts of the screen are replaced with other things (the inspector randomly flashes to the game view…) Any thoughts on this end would be nice.