I am working on a game where you can zoom in and out with the camera (which is linked to a character controller) using the mouse wheel. Would it be possible to reset the camera to the starting position by clicking the middle mouse button (i.e. undo the motion)? This is to make it more convenient when players zoom too far in or out.
One should never transform perspective by physical movements, but rather you should dynamically change it by way of changing the camera’s FOV. This can be done several ways:
Animation
Simple animate the camera’s fov OR lens value in the properties window Camera tab, thus turning it into an animation action that you can drive with numerous logic controls.
Is there a reason why this to be the case? I’m asking because moving camera around is the method I’m using currently to implement the 1st/3rd person camera
I can see how adjusting only FOV can work if the character doesn’t move but what if he does or if you want to implement something like Skyrim’s camera control?
Simple answer is that LODs and sometimes OOP shaders relies on the camera’s origin location.
If you transform the camera’s view without transforming itself physically, you might well break several carefully crafted mechanics that you may or may not have implemented.
Note: I am not sure this fact still applies to frustum-culling, object-culling, and physics-culling.
I tried this but for some reason when I click the middle mouse button - the camera ends up far away from the character controller. I thought this may be due to the values but changing them seemed to have no effect. Any thoughts? Thanks.
I have a feeling that it’s at least allowable to move the camera in such a scenario, if there’s no other issues than LOD or culling could be a problem. When I zoom out the camera far behind the player character in a Skyrim-like 3rd person camera view, for example, I certainly want objects closer to the camera - not to the character - to have full LOD/physics details.
Maybe it’s something that can be chosen depending on the circumstances, I suppose. Thanks for the explanation!