Jump to content

Problem with custom docking port


Recommended Posts

I have build a docking port as a part of my new (first) mod, but during testing I ran into the following problem: The two docking ports lock on to each other, but they won't connect. Also the log produces this message:

Quote

NullReferenceException: Object reference not set to an instance of an object
ModuleDockingNode.<SetupFSM>m__2D1 (.KFSMState st)
KerbalFSM.updateFSM (KFSMUpdateMode mode)
KerbalFSM.UpdateFSM ()

Otherwise the parts behave normal: attaching in editor, decoupling, etc. works fine.

I have tried to simplify the dockingPortModule as much as possible, but to no effect.

complete log + cfgs + two screenshots of parts in unity: https://www.dropbox.com/sh/3w0ojw0s82nnn5m/AAAa9pVFkZNYPqxnm9UqzeTYa?dl=0

Thanks in advance for any help.

Link to comment
Share on other sites

For the docking module to work the part needs a transform that represent the docking "force" source. In the module config that transform is called nodeTransformName and its default value is "dockingNode". So my guess is that you do not currently have a transform called "dockingNode"

 

Link to comment
Share on other sites

The docking node might also be buried a little behind the collider. If the node can't get close enough to its target then it may be able to start the docking procedure (the magnets turn on), but not close enough to actually dock.

Link to comment
Share on other sites

  • 2 weeks later...

The above suggestions are good-  make sure your docking node is located outside the collider.  It looks like you've got the blue arrow on the docking node pointing out into space correctly?  Blue arrow points towards where the other ship will be when docking, just to be clear.   

Working correctly in the VAB means your reference attach node is working properly.  

It shouldn't need to be said, but there's no reason not to...  so you might as well explicitly define the docking node - 

	
	nodeTransformName = dockingNode

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