setCamera remembers position
-
If you do not use
setCamera
in a 3D game, the camera will have the position and target that it was last set by by a different game.It's debatable if this really is a bug, but it smells like one, as I don't expect anything to leak between runs.
-
This has just tripped me up when I commented out setCamera and ran again and the camera was not at 0,0,0 but the same place as before.
I've made a note to always setCamera in a 3D program to reset it and avoid this issue.
-
I suspect this is probably how the bug got missed or introduced in the first place - people just inherently using setCamera and not really occurring that people might not.
-
That's exactly why I wrote "It's debatable if this really is a bug". Since it's fair to say that people should just use setCamera.
In general I think it's nicer to always have the same starting state for a game, to prevent weird states that are hard to reproduce because steps are involved that might not even be related to the same project.
It appears that there are more instances in FUZE, especially when it comes to error handling, where you don't always get a clean slate per run. But those cases are harder to reproduce. So although the setCamera behavior might not be related on a technical level (but I don't know that), I was also hoping to make the point about expectation in a broader sense as well :)