I don’t use FlybyCamera in my game, but I do use it in TestSkyControl. Today while I was zooming, I suddenly and unexpectedly found myself outside the sky, looking in – a disorienting experience.
At first I assumed this was a bug in my code, but a quick investigation traced the issue to line 344 of FlybyCamera.java:
fovY += value * 0.1f * zoomSpeed;
I can’t believe I’m the first person who’s ever made fovY go negative in this way. And when fovY goes negative, so does the frustrum height.
Is there a workaround to prevent this? If not, I think a range check should be added.
A range check should be added, I guess.
I think most people abandon flyby camera pretty early in serious development. That may be why it hasn’t been encountered before. Or they just never zoom. (I forget that it even can zoom sometimes.)
Fly cam is pretty meh. I’ve had that situation before but never posted it because that cam is more like a “while I do a proper camera” tool than anything else.
The bug is now fixed in trunk, but I agree FlyByCamera is meh. Perhaps it’s time to start collecting requirements for a BetterCameraController.