Jump to content

How to make attached parts to follow collider movement?


Recommended Posts

I've made a small part, functionally resembling Balka Solar Wings central block.

http://www./download/ocpmo2vurvpedtf/SolarBase.zip

The moving part was following the sun correctly. Then I wanted to put some solar panels on that in VAB (that was the main reason for making such a part :wink:). Panels attached, as the collider was in place, but after launch, when central part actually started to move, solar panels didn't want to follow and just sat there.

What can be the problem and how to fix it?

Link to comment
Share on other sites

You can't, KSP physics don't work that way. Parts are attached by nodes, either surface attach nodes or stack attach nodes, but when the craft is converted into an actual vessel those coordinates are interpreted into coordinates relative to the parent part's origin. So when your part animates, the mesh moves, but nothing else cares. The only way to overcome this is via a plugin which will move the child part's attachment coordinate to match, but having that be based on the animation is not really practical using surface attach nodes. Stack Attach Nodes can be made to use transforms built into the original mesh object structure, so you can place a node childed onto an animated bit so that the transform moves as part of the animation. Then the plugin can use that transform in keeping the child part anchored onto the moving mesh correctly.

Or you can use Infernal Robotics, which does that for you.

Link to comment
Share on other sites

You can't, KSP physics don't work that way. Parts are attached by nodes, either surface attach nodes or stack attach nodes, but when the craft is converted into an actual vessel those coordinates are interpreted into coordinates relative to the parent part's origin. So when your part animates, the mesh moves, but nothing else cares. The only way to overcome this is via a plugin which will move the child part's attachment coordinate to match, but having that be based on the animation is not really practical using surface attach nodes. Stack Attach Nodes can be made to use transforms built into the original mesh object structure, so you can place a node childed onto an animated bit so that the transform moves as part of the animation. Then the plugin can use that transform in keeping the child part anchored onto the moving mesh correctly.

;.; So, it wont work... And to make it work I need either to write my own plugin (considering I'm NOT a programmer), or remaking a part with inbuilt panels and deploying animation (which cannot be imported from existing parts) and second SP module... Complete sadness...

Or you can use Infernal Robotics, which does that for you.

Any way to do sun tracking with IR parts ? :huh: I doubt that. However, the idea itself is pretty... Not only suntracking, but tracking ANY targettable object with IR-driven manipulators... Very useful for KSPI microwave transmitting... and possibly further versions of RT... But who will write such a code?

Link to comment
Share on other sites

I have a fresh idea... what if I use FXModuleConstrainPosition for moving empty transforms along with main collider and assign nodes to them? Need a try.


It seems that attaching nodes to transforms no longer works and crash the client. :(

Edited by Dr. Jet
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...