Jump to content

[RESOLVED] ModuleDeployableSolarPanel - How to Use?


Recommended Posts

I'm attempting to create a solar panel part. I copied the following from the stock "solarPanels2" cfg. On the launchpad, my part shows: "Status: Retracted" and "Extend Panels".

I click the "Extend Panels" button and my panels extend. However, the Status stills shows "Retracted". Yet, the action button changes to "Retract Panels". Clicking this button does nothing. Also, the context menu window shows no power being generated.

I looked at AIES's solar panels, and its config file looks similar.

Here is the CFG I copied from stock. "panels" is the name of my animation clip in Unity.


MODULE
{
name = ModuleDeployableSolarPanel

animationName = panels

resourceName = ElectricCharge

chargeRate = 12

powerCurve
{
key = 206000000000 0 0 0
key = 13599840256 1 0 0
key = 68773560320 0.5 0 0
key = 0 10 0 0
}
}

I found this thread, but it describes only the variables for this module. http://forum.kerbalspaceprogram.com/threads/41368-Solar-Panel-Question

What am I missing? thanks

Edited by Apollo13
Link to comment
Share on other sites

You have to set a pivot name even if your panel doesn't track the sun. Then just set sunTracking = false and it should work. If you DO want it to pivot set sunTracking = true. Either way you need to define a pivot name.

You also need a raycastTransformName. This should be set to the name of the part that actually collects sunlight. It should be a plane that you remove the mesh render on.

Edited by raidernick
Link to comment
Share on other sites

OK. I'll add those things in. But, why does the Squad "solarPanels2" not need those? They track the sun. The CFG in the OP was copied directly from the solarPanels2 CFG.

You also need a raycastTransformName. This should be set to the name of the part that actually collects sunlight. It should be a plane that you remove the mesh render on.
Should I set it to something else? Edited by Apollo13
Link to comment
Share on other sites

I see in your US Probes pack thread, there are several different solar panels. I'm downloading the pack now to see.

I caught this in your pioneer5 CFG:

MODULE
{
name = ModuleDeployableSolarPanel

sunTracking = true

raycastTransformName = suncatcher
pivotName = suncatcher

isBreakable = false

resourceName = ElectricCharge

chargeRate = 0.1

powerCurve
{
key = 206000000000 0 0 0
key = 13599840256 1 0 0
key = 68773560320 0.5 0 0
key = 0 10 0 0
}
}

Edited by Apollo13
Link to comment
Share on other sites

Yes I made them, however they are part of the main mesh, not their own individual parts. I would not recommend doing this unless you have to.

MODULE
{
name = ModuleDeployableSolarPanel
animationName = Deploy
sunTracking = true
raycastTransformName = aura_suncatcher
pivotName = rotate
isBreakable = false
resourceName = ElectricCharge
chargeRate = 16
powerCurve
{
key = 206000000000 0 0 0
key = 13599840256 1 0 0
key = 68773560320 0.5 0 0
key = 0 10 0 0
}
}

Link to comment
Share on other sites

Here's a thread to what I'm trying to do:

Concept art. Three panels rotate 180 degrees; then, solar panels extend.

Fe2SykH.jpgkELjLBM.jpgRHRgFc2.jpgz5dKvzf.jpgcCzMve4.jpg

In your example in your post, you show "Deploy" Do you have a separate action for Retract?

Edited by Apollo13
Link to comment
Share on other sites

If these panels suntrack each will need to be its own part with their own pivot. This pivot should be an empty game object. I've never tried to have multiple panels with multiple pivots at the same time. I'm not sure this is possible with a single solar panel module. If they don't suntrack its as easy as adding a suncatcher object.

Link to comment
Share on other sites

Each panel does have a pivot; I assume I pass that part name as "pivotName"?

As for "raycastTransformName "? Is that just any part? If I remove the mesh render (post #2), will the part still be displayed?

Edited by Apollo13
Link to comment
Share on other sites

OK, then. I'll give that all a try and let you know how it comes out, including the multiple pivots problem.

Thank you for taking the time here.

I just imported your pioneer5. MU into Blender to see your posts in action. I see what you mean about the suncatcher plane.

Edited by Apollo13
Link to comment
Share on other sites

As raidernick mentioned, you MUST HAVE both of these, even if you do not use sun-tracking.

raycastTransformName = suncatcher

pivotName = suncatcher

Helpful links:

http://forum.kerbalspaceprogram.com/threads/38408-Rotating-solar-panels-(Unity-configuration)

http://forum.kerbalspaceprogram.com/threads/52155-The-Solar-Panel-Problem?highlight=transform

http://forum.kerbalspaceprogram.com/threads/41368-Solar-Panel-Question

Edited by Apollo13
Link to comment
Share on other sites

  • 2 years later...
On 9/16/2014 at 1:16 AM, raidernick said:

You also need a raycastTransformName. This should be set to the name of the part that actually collects sunlight. It should be a plane that you remove the mesh render on.

Whoha! that probably explains why my panel turned transparent! i've been flipping the normals like crazy to no avail. Thanks a lot (someone should make some nice video tutorials especially about solar panels and engines)

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