XCOM 2
Free Camera Rotation
wasteland_ghost  [developer] Mar 19, 2016 @ 9:09pm
Zoom customization
Zoom levels are defined inside XComCamera.ini file, which is located in [Path To Steam Library]\XCOM 2\XComGame\Mods\FreeCameraRotation\Config for manual install and in [Path To Steam Library]\steamapps\workshop\content\268500\616359783\Config folder for workshop install. You will also need to edit XComTacticalInput_FreeCameraRotation.ini file, located in the same folder.

Since the game uses min allowed zoom multiplier ZoomedDistanceFromCursor for both zoom in and zoom out, big values tend to break zoom in - camera starts to overshoot the target, inverts and goes under ground, which doesn't look good. So when editing zoom distances, make sure you adjust MIN_ZOOM_MULT to prevent overshooting. If you don't care about overshooting, you can set MIN_ZOOM_MULT=-1.0f and forget about it.

1. Get back to vanilla zoom levels.
In XComCamera.ini:
ZoomedDistanceFromCursor=2600
DistanceFromCursor=1256
In XComTacticalInput_FreeCameraRotation.ini:
MIN_ZOOM_MULT=-0.75f

This is exactly how vanilla zoom is, but I recommend using MIN_ZOOM_MULT=-0.483f instead to avoid overshooting.

2. Increase default zoom level to x1.5:
In XComCamera.ini:
ZoomedDistanceFromCursor=5024
DistanceFromCursor=1884
In XComTacticalInput_FreeCameraRotation.ini:
MIN_ZOOM_MULT=-0.375f

In general, when you increase/decrease any of the distances, make sure that MIN_ZOOM_MULT is set to minus DistanceFromCursor divided by ZoomedDistanceFromCursor, so max zoom in will result in zero distance from cursor and won't go negative.
Last edited by wasteland_ghost; Mar 24, 2016 @ 9:21pm
< >
Showing 1-10 of 10 comments
wasteland_ghost  [developer] Apr 10, 2016 @ 7:33am 
Since Firaxis programmers have used max distance for both zoom in and zoom out, for max distances which are more than twice bigger than normal distance overshooting happens. I've fixed this for normal camera by overriding an appropriate class, but I've left other cameras unchanged as I need to override each and every of them to add zoom in limit. I decided that this would be a bit of an overkill.
wasteland_ghost  [developer] Apr 10, 2016 @ 11:10am 
Fun part is, with EU/EW style hex modding it would be an easy edit to make it work for all the existing cameras. :)
wasteland_ghost  [developer] Apr 11, 2016 @ 12:35am 
No, but I can look into this. The reason why I see hex editing would be easier here is that overshooting is checked in a class, which is a base for almost all other camera classes. And we can't override base classes, which is understandable, but still frustrating.
Last edited by wasteland_ghost; Apr 11, 2016 @ 12:36am
wasteland_ghost  [developer] Apr 11, 2016 @ 12:55am 
So, I made a quick patch and it seems to work as intended.

You will need PatcherGUI, grab it here: http://www.nexusmods.com/xcom/mods/448

And here's the patch: http://pastebin.com/bFH5rmzz Change -0.25 to your MIN_ZOOM_MULT value, i.e. to -0.496 for your last example, save and apply. It might break multiplayer for you, though. I don't know if and how they protect multiplayer games, but I would advise caution with all that Steam anti-cheating.
furiousgeorge13 Jan 17, 2017 @ 3:34pm 
This is a great mod!! ... I'd think it'd be on everybody's top 10
That being said, I wonder if you could clarify for me how to change the granularity of the Zoom change Amount. That is, when I want to get in close (really close), I go from "That's good... almost enough ... maybe a little more ..." to "Whoooo !! way too much! ". And at high zooms, the same can be said for the navigation/movement keys (WASD).
I looked at your INIs, and have tried poking around elsewhere for this too, but no luck. Any pointers ??
wasteland_ghost  [developer] Jan 17, 2017 @ 9:11pm 
XComTacticalInput_FreeCameraRotation.ini:
CAMERA_ZOOM_SPEED=1.0f ; zoom factor per second. For zooming to be smooth you need to match MaximumInterpolationZoomPerSecond value (in XComCamera.ini) to this one.
furiousgeorge13 Jan 21, 2017 @ 3:21pm 
As I understand it, that affects the speed of the zoom, as is linked to the middle mouse button. This feature in itself acts a little wonky, in that it doesn't stop at any zoom level - clicking or holding or dragging with the middle button only ever triggers a zooming action, and upon release zooming just resets back to its starting level/amount/distance.

What I was referring to would be the "step size" of the zoom. When using the zoom keys (default T and G), the zoom amount (distance, actually) changes always changes the same anmount, which is not so bad when far out, but way too much when closer in. I'd think it'd be nicer to have it so that the increment gets smaller as the zoom level gets higher ("closer"). Or just set the fixed increment smaller.

In an OpenGL context, the zoom operation would be a glLookAt function, where camera up-vector and "look at location" remain unchanged, but the camera location varies in distance along a vector from that focus to a fixed point (the current camera location). It seems that the keys trigger just this sort of behavior - it's pretty much required in most games, and in fact for FPS the player is the camera. So it's been done to death, and very common.

My issue is - the increments of that camera position change are pretty large. In other words, the distance the camera position is moved along its current lookat vector is way bigger than I'd like. Any tips as to whether that setting is editable, and if so - where is it?
wasteland_ghost  [developer] Jan 21, 2017 @ 10:16pm 
Discrete zoom step is hardcoded as far as I remember and it is calculated based on max-min zoom levels. If it was easy to add to ini, I would have done it, so it must be somewhere inside a base camera class which is not easy to override (will need to override all necessary child classes as overriding base class is useless).
Oravankarva May 6, 2020 @ 10:26am 
Thank you, i finally managed to do it. Very cool you took your time making this. 5/5
Mustang0524 May 19, 2022 @ 10:46am 
Thank you for putting this info out. I go by your edited values and it's perfect every time. It's literally the first mod I install when I come back to Xcom 2.
< >
Showing 1-10 of 10 comments
Per page: 1530 50