Jump to content

What happens at 200m?


Recommended Posts

For my Docking Port Alignment Indicator mod, I'm trying to allow a targeted docking port to remain targeted once it's more than 200m away from the active vessel.

As far as I can tell, at 200m exactly, KSP switches the active target to the targeted vessel's root node. I can programmatically re-target the Docking Port, but an instant later KSP switches the target back to the root node.

Quite simply - how and where is this retargeting occurring, and how can I override/intercept that behaviour?

Edited by NavyFish
Link to comment
Share on other sites

A simple (though not optimal) potential solution would be to re-target the docking port every frame instead of once, assuming that KSP will let you make the switch once.

Indeed, this does work. It seems so horribly hackish, though (for example, the debug log becomes absolutely overwhelmed with spam), that I decided not to publish it in my latest release.

Not that I'm opposed to hacks :), but I am concerned with second- or third-order consequences of that particular approach.

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...