Jump to content

View zoom out on camera mode change


Recommended Posts

Hi

I have not found a way to reproduce this bug, it happens at some point during gameplay and the only way to fix this is to restart ksp.

If I switch ie from auto mode to free mode the view is zoomed out , zooming in with the mouse scroll and I can keep play. At every camera mode change the view is zoomed out, if I keep changing camera mode the zoom out keep going until, I guess a limit on the variable is met, the game get stuck ( alt+f4 ).

Anyone got something like this?

mods and logs :

https://www.dropbox.com/s/vh3q8i0o8t5bbbm/KSP20140927.zip?dl=0

Link to comment
Share on other sites

Ok, I found a way to reproduce the bug and reduced the mod list to TweakScale 1.43 and Karbonite 0.3.5

1. Launch craft

2. Try to change camera, all is ok

3. Revert to launch

4. Change camera and....bug

I'll post my findings to both mods maker

EDIT: actually is TweakScale 1.43 with ModuleManager.2.3.5 causing the issue tryed also ModuleManager.2.4.5 with same result

Edited by brusura
Link to comment
Share on other sites

This has been posted before: http://forum.kerbalspaceprogram.com/threads/91077-need-help!-screen-keeps-zooming-right-out-when-i-press-v-to-change-view

I am 100% sure it is NOT tweakscale. I've had this exact same behaviour too weeks before I even knew TweakScale existed, let alone have TweakScale installed.

Link to comment
Share on other sites

How can you be 100% sure? I did also a fresh installation with those two mods. It's something with TweakScale and MM fighting each other, because I have tryed with all my mods ( expect tweakscale ) and MM, no bug, with only TweakScale and MM and I have the bug.

Edited by brusura
Link to comment
Share on other sites

How can I be sure? It happened to me BEFORE I had TweakScale installed.

Maybe was bundle with another mod? Can you try and reproduce these steps and tell me your result ?

Clean KSP installation with TweakScale 1.43 and MM 2.3.5

1. Launch craft ( at least one part must be scalable, ie Mk1 cockpit )

2. Try to change camera, all is ok

3. Revert to launch

4. Change camera and....bug

Link to comment
Share on other sites

And the inability to read and the failure to understand the word 'not' won't get you anywhere.

So you have followed these steps and you do not have this bug I assume, verifying a problem on different configuration is fundamental to try address a bug.

Clean KSP installation with TweakScale 1.43 and MM 2.3.5

1. Launch craft ( at least one part must be scalable, ie Mk1 cockpit )

2. Try to change camera, all is ok

3. Revert to launch

4. Change camera and....bug

So?

Link to comment
Share on other sites

Clean KSP installation with TweakScale 1.43 and MM 2.3.5

1. Launch craft ( at least one part must be scalable, ie Mk1 cockpit )

2. Try to change camera, all is ok

3. Revert to launch

4. Change camera and....bug

Hello,

I'd just like to point out that I was able to reproduce the bug following these instructions. TS 1.43 and MM 2.4.4.

Edited by ObsessedWithKSP
Link to comment
Share on other sites

  • 2 weeks later...
Is this actually a TweakScale bug? I I've been having trouble with that for a while now.

could you please follow my steps and confirm this? If it is not TS it is something that TS activate in KSP?

PS: try also without TS and see if the bug is still present of course

Edited by brusura
Link to comment
Share on other sites

I've now tested this with TweakScale 1.43 and 1.44 on both 0.24.2 and 0.25. I am unable to replicate the behavior. Perhaps output_log.txt says something interesting?

To be perfectly sure we're doing the exact same things:

This is my .craft file. It is simply a Mk1 Cockpit. Not moved, not rescaled, not touched in any way.

After creating this in the VAB, I press Launch.

(a) After launching the craft, before physics has started running (while craft is hovering ~5cm above launchpad), I move the camera by right-clicking and moving the mouse up, down, left and right. No problems.

(B) After physics have started (craft falls to the surface of the launch pad), I move the camera again in the same manner. No problems.

I press escape to bring up the menu, then click 'Revert Flight', then 'Revert to Launch (Xs ago)'.

(a) After launching the craft, before physics has started running (while craft is hovering ~5cm above launchpad), I move the camera by right-clicking and moving the mouse up, down, left and right. No problems.

(B) After physics have started (craft falls to the surface of the launch pad), I move the camera again in the same manner. No problems.

I have tried leaving out step (a) with no difference in behavior.

Are there any differences in the way I'm trying to replicate the problem?

Link to comment
Share on other sites

And apparently I hadn't watched the video above. I must be drunker than my 0.0% BAC indicates. I am decidedly and utterly confused by the behavior though, as the code should do nothing special when changing camera mode, and leaving the size unchanged shouldn't scale anything at all that would make the behavior sensible.

I guess tomorrow is the day when I comment out random sections of TweakScale code to see if the problem disappears.

Link to comment
Share on other sites

It looks like this is actually a bug in KSP (!). In this code:

if (defaultTransformScale.x == 0.0f)
{
defaultTransformScale = part.transform.GetChild(0).localScale;
}

savedScale = part.transform.GetChild(0).localScale = scalingFactor.absolute.linear * defaultTransformScale;

I save the default scale of the part, and use it again later. For the Mk1 Cockpit, defaultTransformScale gets set to (1.3, 1.3, 1.3). Since defaultTransformScale is persistent (isPersistant = true), this gets saved with the .craft file, and loaded when you launch a craft.

Now, when you launch the vessel, part.transform.GetChild(0).localScale is (1.3, 1.3, 1.3), and everything works great.

More unexpected: when you revert to launch, part.transform.GetChild(0).localScale is set to (1, 1, 1). This does not bode well, and indeed that's how the bug triggers.

If I wait a little longer, part.transform.GetChild(0).localScale is indeed set correctly to (1.3, 1.3, 1.3). Updating at this point does not trigger the bug.

By marking defaultTransformScale as not persistent, I am rid of this weird behavior, but at an untenable cost: things now scale incorrectly. (because defaultTransformScale is 1 instead of 1.3, and things are ~30% smaller)

If I wait a frame, so I get the right part.transform.GetChild(0).localScale, the part is also scaled incorrectly.

So it seems I'm stuck between a rock and a hard place: either I trigger a bug, or my mod doesn't work. I'm going to with option #1 for now, and file a bug with Squad.

If I think of a better way to fix things, I'll post an update here and in the TweakScale thread.

Link to comment
Share on other sites

  • 1 month later...
It looks like this is actually a bug in KSP (!). In this code:

if (defaultTransformScale.x == 0.0f)
{
defaultTransformScale = part.transform.GetChild(0).localScale;
}

savedScale = part.transform.GetChild(0).localScale = scalingFactor.absolute.linear * defaultTransformScale;

I save the default scale of the part, and use it again later. For the Mk1 Cockpit, defaultTransformScale gets set to (1.3, 1.3, 1.3). Since defaultTransformScale is persistent (isPersistant = true), this gets saved with the .craft file, and loaded when you launch a craft.

Now, when you launch the vessel, part.transform.GetChild(0).localScale is (1.3, 1.3, 1.3), and everything works great.

More unexpected: when you revert to launch, part.transform.GetChild(0).localScale is set to (1, 1, 1). This does not bode well, and indeed that's how the bug triggers.

If I wait a little longer, part.transform.GetChild(0).localScale is indeed set correctly to (1.3, 1.3, 1.3). Updating at this point does not trigger the bug.

By marking defaultTransformScale as not persistent, I am rid of this weird behavior, but at an untenable cost: things now scale incorrectly. (because defaultTransformScale is 1 instead of 1.3, and things are ~30% smaller)

If I wait a frame, so I get the right part.transform.GetChild(0).localScale, the part is also scaled incorrectly.

So it seems I'm stuck between a rock and a hard place: either I trigger a bug, or my mod doesn't work. I'm going to with option #1 for now, and file a bug with Squad.

If I think of a better way to fix things, I'll post an update here and in the TweakScale thread.

Is there any news on this bug as of yet? I seem to have a ship suffering from this bug. Whenever I switch to it and change the camera mode, my view zooms out really fast, like within a few seconds I'm out of the solar system, Kerbol becomes a small dot and the screen goes black and the only way to fix it is to restart KSP.

It seems exactly the same as the bug shown in the video, only in space.

Is there any way to get my ship out of this?

I's strange because I managed to get the ship into orbit with the camera changing, but now it's a problem when I change orbits.

Is there perhaps something I can tweak in my save file to fix the scaling bug? And how can I prevent it from affecting other ships?

Link to comment
Share on other sites

  • 4 months later...

I'm sorry to bump this but I'm wondering if a fix is available for this yet. Or does Squad know about this at least? People seem to be able to reproduce this reliably so I assume it was added to the Bugtracker?

Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...