Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Kerbals on EVA spawn several meters away from the vessel #1452

Closed
scimas opened this issue Jul 3, 2017 · 6 comments
Closed

Kerbals on EVA spawn several meters away from the vessel #1452

scimas opened this issue Jul 3, 2017 · 6 comments
Labels
Milestone

Comments

@scimas
Copy link
Contributor

scimas commented Jul 3, 2017

Since Cauchy, kerbals on EVA from a vessel in orbit spawn several meters away from the vessel. Doesn't happen when EVA-ing on ground or in atmosphere.

@pleroy pleroy added the bug label Jul 3, 2017
@pleroy
Copy link
Member

pleroy commented Jul 3, 2017

Thanks for the report. We were able to reproduce it. Will investigate more.

@eggrobin
Copy link
Member

eggrobin commented Jul 3, 2017

We tested EVA when solving #1415, so the branch for #1428 still worked; however this was branched off master before #1426 was merged, and that one may affect new vessels.
I will check whether we skip some frames on the newly-added Kerbal.

@eggrobin
Copy link
Member

eggrobin commented Jul 5, 2017

Update: I do not see the message Skipping AdvanceTime and SetBodyFrames while waiting for the vessel to be fully ready (see #1421). in the log when reproducing the issue, so it is probably something else.

@eggrobin
Copy link
Member

eggrobin commented Jul 5, 2017

See the following link for the diff of the adapter between the state when we tested solved the ladder bug (where EVA still worked) and Cauchy: b7f6b86...2017062403-Cauchy.
Something that stands out there is the fix for #1307. I will try to determine whether that is the issue.

@eggrobin
Copy link
Member

eggrobin commented Jul 5, 2017

That seems to be it, I'll have to figure out why it breaks EVA spawning though, because we still need #1307 to stay fixed.

@eggrobin
Copy link
Member

eggrobin commented Jul 6, 2017

Ok, the explanation is that when an EVA Kerbal is created, it ignores collisions with the ship that spawned it for a little while. This appears to be done by nudging it back to the airlock in the same way we nudge things, after yielding WaitForFixedUpdate; since we expect nothing to run there, random things ensue (it happens that nudging the transforms of the rigid bodies nudges the airlocks, while nudging the rigid bodies themselves did not, which is why the fix for #1307 uncovered this).
Since KSP is taking care of moving that Kerbal around, we don't need to move it, so this is solved by adding an unmanageability reason:

    if (vessel.isEVA && !vessel.evaController.Ready) {
      reasons.Add("vessel is an unready Kerbal");
    }

The Kerbal becomes known to Principia and is nudged exclusively by us once it is ready.

I will make a CL tomorrow to fix this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants