Jump to content

Angle snap on docking ports


Recommended Posts

So docking ports would angle snap by default with no input from the user? I'm actually cool with that, too. Lining up specific space station parts can get tedious.

Let's use some concrete examples:

- A CBM (such as my FusTek IACBM) is designed/defined to accept only four angular offsets of 0, 90, 180 and 270 degrees. So by default, two CBMs will attempt to line up 0-0. If a user rolls their vessel far enough in-flight, it will now snap to 0-90, but if not, then it remains at 0-0. Rolling the vessel further in-flight would permit 0-180 and 0-270 alignment.

- An APAS-95 system accepts only three angular offsets of 0, 120 and 240 degrees. Again, by default it would snap to 0-0, but if you roll the vessel far enough in-flight you get 0-120 and 0-240 alignment.

In short, angle snap is hands-off by default, unless you deliberately roll your vessel far enough to line it up with a new snapping position allowed by that specific docking port design.

The reason I advocate CFG-hardcoded angle snap values is because the alternative (putting colliders on docking ports to guide orientations) doesn't work - when the docking magnets engage, KSP completely ignores said colliders.

Link to comment
Share on other sites

I'd personally prefer to be able to - after docking - rotate the ports relative to each other to any alignment. Maybe I want 27.4 degrees. Maybe I want 90 degrees (EXACTLY). Maybe I want something else. Give me a text box and rotate to that degree setting.

And maybe also have a setting for a port that automatically rotates anything that docks to it to the nearest X degree mark (90, 45, 30, 15, 180, etc)

Link to comment
Share on other sites

I'd personally prefer to be able to - after docking - rotate the ports relative to each other to any alignment. Maybe I want 27.4 degrees. Maybe I want 90 degrees (EXACTLY). Maybe I want something else. Give me a text box and rotate to that degree setting.

MechJeb's Docking Autopilot already supports this sort of precision for arbitrary angular offsets - you enter the require offset in degrees, and the autopilot does it for you.

I think my tome was looking mainly at extending the moddability of docking ports.

Link to comment
Share on other sites

The reason I advocate CFG-hardcoded angle snap values is because the alternative (putting colliders on docking ports to guide orientations) doesn't work - when the docking magnets engage, KSP completely ignores said colliders.

Surely this should be the actual change request: Make collider docking port guides work. After all, that is what you're trying to emulate using the configuration file definitions. It would be better to make this possible than try and rewrite some simplified collider code with lots of edge cases thrown in for good measure. Personally, I'd rather see docking magnets moved to a difficulty option as was discussed by Squad in the past. Colliders would be valid for both difficulty levels.

Colliders automagically resolve issues with deciding what can and can't dock. Your three-orientation port can dock with a 6-orientation port if its fins are made narrow enough to allow it. Stock example:

JEQ65yo.gif

With regards to the proposed configuration, rather than using an increment for rollAlignIncrementAngle, if a list of values was used instead, you'd allow asymmetric docking alignments such as 0° and 130° only.

Edited by pizzaoverhead
Link to comment
Share on other sites

Surely this should be the actual change request: Make collider docking port guides work. After all, that is what you're trying to emulate using the configuration file definitions. It would be better to make this possible than try and rewrite some simplified collider code with lots of edge cases thrown in for good measure. Personally, I'd rather see docking magnets moved to a difficulty option as was discussed by Squad in the past. Colliders would be valid for both difficulty levels.

Colliders automagically resolve issues with deciding what can and can't dock. Your three-orientation port can dock with a 6-orientation port if its fins are made narrow enough to allow it. Stock example:

http://i.imgur.com/JEQ65yo.gif

The reason I suggested not dealing directly with colliders is because even they could sometimes be imprecise.

For instance, the THSS truss add-on had special docking ports for aligning dockable truss segments, which had large fins to guide alignment. Even if colliders were fully operational throughout all phases of docking, there is actually a very small but noticeable amount of play in the collider alignment, which results in cumulative alignment errors over several segments.

With regards to the proposed configuration, rather than using an increment for rollAlignIncrementAngle, if a list of values was used instead, you'd allow asymmetric docking alignments such as 0° and 130° only.

Actually, now that I think of it, this is an even better idea!

When I first proposed the idea back in August 2013, I assumed that the time the CFG variables could only have one value. A comma delimited list as you've suggested would be far more intuitive:

MODULE
{
name = ModuleDockingNode
referenceAttachNode = top
nodeType = size1

[B]// Comma-delimited list of allowable rotational offset angles for docking in degrees (0~359)
// If not specified, defaults to false, which allows docking without forcing any alignment (as is currently the case[/B])
[B] snapAngles = false[/B]
}

1) Stock Clamp-o-tron docking ports


{
name = ModuleDockingNode
referenceAttachNode = top
nodeType = size1
}
MODULE

Since snapAngles is not specified, the Clamp-o-trons will dock freely at any angle about their common docking axis.

2) FusTek IACBM


{
name = ModuleDockingNode
referenceAttachNode = top
nodeType = IACBM_125
snapAngles = 0, 90, 180, 270
}
MODULE

FusTek IACBMs can only dock any one of four possible snap angles.

3) APAS-95


{
name = ModuleDockingNode
referenceAttachNode = top
nodeType = IACBM_125
snapAngles = 0, 120, 240
}
MODULE

The Russian APAS-95 can only dock any one of three possible snap angles.

2) Some weird docking port


{
name = ModuleDockingNode
referenceAttachNode = top
nodeType = someWeirdDockingPort
snapAngles = 45, 135, 225, 315
}
MODULE

An unusual docking port can only dock any one of four possible snap angles, but with a 45 degree offset compared to the FusTek IACBM case.

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