- Home /
Unity 2D scrolling camera constantly
So I am in need of a scrolling camera that will scroll when the character reaches a certain point. Note that this is not a constantly moving character in which the background is repeating constantly (i.e. like in flappy bird) so I only scroll when the character actually get close to the top edge of the screen. My question is that I am going to be constantly moving the camera the moment the player gets close to the top edge. This means the camera's y position will constantly be increasing. So if the player plays the game long enough then the camera's y position will keep getting bigger and bigger. This probably won't be an issue but I am wondering if it's possible that the y position could get too big.
Answer by RShields · Aug 15, 2018 at 05:24 AM
Assuming Unity stores positions as floats, you should never overflow. The maximum limit for floats is somewhere in the range of 3.4 * 10^38.
I would still have to rely on an assumption. Would you recommend I find another way or not to worry about it?
Your answer
Follow this Question
Related Questions
2D camera panning and can't click UI buttons 0 Answers
Camera setup question 2 Answers
Cinemachine weird lines of color when moving? 1 Answer
How do I get rid of this motion blur? 0 Answers
Attaching an RTS scrolling script to a camera (Noob Question) 3 Answers