Jump to content

[Solved] Self-aligning docking ports and convex colliders


Recommended Posts

you know what i meant by "your" and ive had this discussion with other people before :)... "your" carries 2 key presses less than "you're".. i'll stick with "your" thx ... oh i misspelt "thanks" :( shoot me :P haha

Anyhow Greys. Unless sumghai is willing to make the part bigger or use code, its probably not gonna be possible to do what hes trying to do. Not with the way dockingNodes work as they are at the moment.

Edited by Adie123
Link to comment
Share on other sites

Rather than make the wedge so smoothly angled, make it more steep, with a square notch kind of key at the "bottom", or top of male end, and make the male end 10-20% bigger than it looks like it needs to be. That will get you as close as you're going to get using a collider, or cause it to explode instantly every time, lol.

Also... it seems really weird there wouldn't be an inbuilt vessel rotation function to take into account SAS torque and all of that.

Link to comment
Share on other sites

Have you looked at how Semni implemented finned docking port in the THSS mod? I know these fins interact and can even prevent successful docking. IMO - this type of system is a PIA. Much easier to use and understand Romfare's docking cam.

Link to comment
Share on other sites

I just had an idea that I'm not equipped to test.

Take the system of colliders that Sumghai originally described, reduce it to 3 radial sections and arch them a bit so it kinda resembles the Ubuntu logo:

VDObA35.png

Now just in front of the peak of each collider put a wheel pointing forwards and set to roll tangent to the circle.

Wheels collide differently and use a raycast system so they're less prone to falling through colliders because the point that rays are cast from is kept a distance from the colliders. The magnetisim will act like gravity and pull the three wheel colliders from each onto the sloped colliders and hold the docking nodes apart while the wheels roll down the slopes, orienting the docks opposite each other. The wheels will get to a point between the sloped colliders and fall through, letting the docking nodes get close together. If the sloped colliders have depth this will also create a pit that the wheel will be locked in like Adie's alignment posts.

Trouble is I don't have the slightest idea how to make wheels.

Edit: Poorly made example where somehow I managed to make Nothing mate up properly.

Javascript is disabled. View full album
Edited by Greys
Link to comment
Share on other sites

Well, that's certainly an interesting idea, Greys.

I'm not familiar with modelling or configuring wheels, but I might try that one day with a four-way variant rather than a three-way. I would also probably make the enter assembly toggleable between the passive and active configurations (i.e. angular offset).

Link to comment
Share on other sites

  • 2 years later...

It has been almost three years since I posed this question, but with the recent updates to the stock game PartModules, I have finally resolved this issue.

To summarize:

- Guidance fin colliders can be as short as you like, although 15~20cm minimum is the most practical; the key thing to note is that they must not fit perfectly, but instead have a small gap between interlocking sets of fins (otherwise, you will have trouble undocking later)

SapOebU.png

HewsTlN.png

- From KSP 1.0.5 onwards, ModuleDockingNode now includes new parameters for limiting docking orientations; set snapRotation to true to enable this feature, and snapOffset to whatever allowable docking orientation increments in degrees (for instance, snapOffset = 90 allows docking in four orientations, while snapOffset = 120 allows docking in three orientations)

- Set captureMinRollDot to a very high value, such as 0.99999, to improve the accuracy of docking at specific allowable angles

- Lower the values of acquireRange and captureRange parameters, as this will give your colliders more time to line the docking ports up before the magnetic clamps kick in (after which the colliders are ignored)

- Reduce the acquireForce parameter, so that the sudden pull of the magnetic clamp does not knock your alignment ajar as much as usual

- Keep the acquireTorque parameter at its default value (by not specifying it); by having a larger acquireTorque relative to acquireForce, it makes it easier for the docking ports to correct orientation

Hope this helps!

Edited by sumghai
date calculation fail
Link to comment
Share on other sites

So one thing I noticed with captureMinRollDot is that it can be a bit finicky. With your new guidance fin colliders, what is the success rate with the 2 ports capturing without having to have any outside intervention of giving the craft a jiggle to capture? 

Link to comment
Share on other sites

6 hours ago, cxg2827 said:

So one thing I noticed with captureMinRollDot is that it can be a bit finicky. With your new guidance fin colliders, what is the success rate with the 2 ports capturing without having to have any outside intervention of giving the craft a jiggle to capture? 

I still had to jiggle a little, but I deemed it acceptable, because the main purpose of my guidance fins was only for coarse alignment.

As mentioned, I did at one stage make the colliders interlock perfectly so that absolutely no jiggling was required to dock, but I couldn't undock afterwards due to very minute intersection of colliders - hence the compromise.

Link to comment
Share on other sites

  • 7 months later...

So theoretically, if snapOffset was set to 360 you would only be able to dock at 1 orientation? alternatively if you set it to 180 and had a triangular configuration of docking colliders you achieve the same affect? (i'm away from my Unity machine so have no means to test this for a week or so).

Link to comment
Share on other sites

12 hours ago, steedcrugeon said:

So theoretically, if snapOffset was set to 360 you would only be able to dock at 1 orientation? alternatively if you set it to 180 and had a triangular configuration of docking colliders you achieve the same affect? (i'm away from my Unity machine so have no means to test this for a week or so).

I believe so, yes.

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