Editor stuck in "2D" mode fix

I've had this "bug"(if it can be called such) happen twice now. The first time it mysteriously fixed itself(possibly?). And I never did figure out how/what/where/why. Then it happened again and was seemingly stuck that way permanently.

What am I talking about? It's a little hard to explain. Basically you can only view things in the editor "top down" and in "2D". By that I mean you lose an axis(or 2?) of camera movement. So the camera can only zoom in/out, and scroll side to side...sort of(but not really, it just spins around a selected a point, moving sort of side to side"ish"). The axis represented by the green line becomes non-functional(and the line itself can't be seen). Or maybe that's the only axis that is functional, and the red and blue are non-functional(I don't really understand what's going on with it)? At any rate, the ability to tilt the camera, and/or rotate it in any way, is gone. Which makes things nearly impossible to edit effectively. Hence, it renders the editor pretty much useless.

So what exactly is the problem? As you might expect, it's a camera issue. Specifically an error that gets saved in the ViewTerrain.xml(located in the AppData\Roaming\SpinTiresEditor folder). Which can be fixed by manually correcting a couple of values that have been changed and set to 0. Or just by deleting the .xml, and allowing the editor to recreate it. I'm not 100% sure how else to fix it(like I said, sometimes it fixes itself maybe? or maybe I fixed it another way without realizing how? I dunno for sure). I do know for sure that verifying the integrity of local files does not work.

What exactly is the error, and how do you correct it manually? Somehow 2 values in the Camera Dir= line get changed to 0. It takes two 0 values to cause the issue. So far as I can tell. I can only replicate the issue by changing the first and last, NOT the center, values to 0. Setting any non-0 value for either, or both, will not cause(or will fix) the problem. All 3 values set to 0 will cause an unrecoverable error when you try to open something in the editor.

Example cause:

<ViewTerrain>
<level_level name>
<Camera Eye="(-2.607; 70.171; -47.312)" Dir="(0; -1; 0)" />
</level_level name>
</ViewTerrain>

Example fix:

<ViewTerrain>
<level_level name>
<Camera Eye="(-2.607; 70.171; -47.312)" Dir="(1; -1; 1)" />
</level_level name>
</ViewTerrain>

How does it happen? I have a vague idea what caused it the last time it happened. No idea how it happened the first time. Anyway, somehow the camera got "lost" when I was viewing a map I'm working on. I think it got zoomed in or out way too far. The map suddenly disappeared from view(as if I'd accidentally zoomed in/out too far), and no amount of zooming in/out, or manipulating the camera any other which way, could bring it back into view. So I finally gave up and closed the editor. BAD IDEA!!! That broke it. The next time I opened it, it was stuck in "2D" mode...for good. Or so I thought...

Blah, blah, blah. That's the deal with it. And that's how you fix it. So when it happens to you, all you have to do now is google/search, find this thread, and not lose your mind trying to figure it out on your own.

You're welcome!

last edited by MudHappy

@mudhappy said in Editor stuck in "2D" mode fix:
Don't know about camera, but something wrong with your level filename - "<level_level name>", remove spaces. Xmlnode name in config should not contain spaces, maybe here is your problem. Level filename sould be in lower case without spaces, use underscores, the maximum length of name is 32 characters.

last edited by blasc

Oh it's the Camera Dir for sure. You can test it by replicating the issue as I described.

And that's not the actual name of my map. I just substituted "level name" for the real name. I don't want somebody using the name before I get a chance to release it. Actually, I'm not even sure if the current name is what I'll end up going with. I've changed it at least 3 times already. One of them was a 2 word name with a space between them. And that never caused any problems. I see people doing it as you suggest, with an underscore instead. But so far as I can tell it isn't necessary. A space works just fine too. Well...for me at least.
EDIT: I don't know what I was thinking of. I just tried it again and you do need to use an underscore. At least as far as the editor is concerned.

last edited by MudHappy

That's weird. I've never had an issue with it.

It's not the only issue I've had with the ViewTerrain.xml either. I had an issue where it was repeatedly erasing(and/or not saving) all the Camera Eye and Dir values every time I closed the editor. So when I opened my map(and in addition to seeing a ViewTerrain fail to init warning when I did) I would have to zoom out quite a bit, or click on the Terrain Game Raw, to bring the map into view. Which I still haven't figured out the cause for. Or why after a couple weeks it finally fixed itself.

Anyhow, it looked like this:

<ViewTerrain>
<level_level_name>
<Camera Eye="" Dir="" />
</level_level_name>
</ViewTerrain>

Actually it looked like a long repeating list of those, one for every time I opened and closed the map in the editor.

Like so:

<ViewTerrain>
<level_level_name>
<Camera Eye="" Dir="" />
<Camera Eye="" Dir="" />
<Camera Eye="" Dir="" />
<Camera Eye="" Dir="" />
<Camera Eye="" Dir="" />
<Camera Eye="" Dir="" />
<Camera Eye="" Dir="" />
<Camera Eye="" Dir="" />
</level_level_name>
</ViewTerrain>

And even replacing the whole file with a backup, containing valid values, would not fix it. It would just erase all those values again...over and over...

So that's how I knew where to look for the Camera settings when this issue presented itself.

Oh...and verifying integrity of local files couldn't fix that either.

last edited by MudHappy

Just a general comment
When I got stuck or lost or zoomed right out, double clicking any model or plant
or any thing really should take you right back in to the terrain

@rustin said in Editor stuck in "2D" mode fix:

Just a general comment
When I got stuck or lost or zoomed right out, double clicking any model or plant
or any thing really should take you right back in to the terrain

I'm glad you mentioned that. Since it just happened to me again a few minutes ago. Twice actually. Both times I just clicked on one of my Locators and that fixed it. So TYVM!

Just trying to edit some Distributions and...POOF! Map vanished. 2 times in less than 2 minutes. WTF?