Jump to content

ModuleDeployableSolarPanel - How to Constrain Pivot?


Recommended Posts

How do I constrain the pivot axis to prevent this situation?

Both the plane of the solar panels and the suncatcher mesh face in the direction of the green line before attempting to track the sun.

The suncatcher mesh is non-rendered. As an experiment, I applied a collision mesh to the suncatcher mesh to determine if that would prevent this. The red-circle is the pivot. There is also a collision mesh that surrounds the vertical truss section; I ensured all face normals faced out.

In this image, the sun is to the left of this position.

q2M8bak.jpg

My part.cfg file:

MODULE

{

name = ModuleDeployableSolarPanel

animationName = Scene

resourceName = ElectricCharge

sunTracking = true

raycastTransformName = suncatcher

pivotName = pivot

chargeRate = 12

powerCurve

{

key = 206000000000 0 0 0

key = 13599840256 1 0 0

key = 68773560320 0.5 0 0

key = 0 10 0 0

}

}

EDIT: With a special thanks to raidernick for his help. Read the thread to see how he resolved the problem.

Edited by Apollo13
Link to comment
Share on other sites

Thank you very much. that worked perfectly. Now, I've got to understand what you did so I can replicate that success.

Also, I've got to work on the collision meshes. When the panel is extended, it doesn't collide, like the stock solar panels do.

Questions:

1) you added an "empty" (rotate). Why?

2) Both the local and global transformation orientations are the same when I select "rotate". How did you do that?

When I switch between local and global on my own models, the arrows change.

How did local versus global allow you to fix this?

3) The "rotate" empty is a child of the panel It is the parent another empty (pivot main) which is the parent of of the pivot. Why these relationships? Why isn't the empty the parent of all?

Edited by Apollo13
Link to comment
Share on other sites

1) I added a rotate because you already baked the rotation on pivot to the wrong direction and flipping it would require adjusting the rotation of each child object(the panels) and redoing the entire animation. You don't need to do this if you have it facing the right way from the start.

2) They shouldn't be the same, the rotate transform is rotated 90 degrees relative to the pivot transform.

3) The middle empty pivot object I added was because when I parented rotate to your pivot it screwed up the rotation of the panel, you won't need this if you do it right from the start. All you need is an empty game object as the pivot(facing the correct way) and the child objects being the rest of the panel.

Link to comment
Share on other sites

All you need is an empty game object as the pivot(facing the correct way) and the child objects being the rest of the panel.

How do I know if an objects pointed the correct direction? How do I ensure I start out right?

By "empty game object" (in terms of Blender), I don't understand.

Edited by Apollo13
Link to comment
Share on other sites

OK. I'll give that a try with a test part. Thank you for the information you've provide. I especially appreciate your patience.

Tomorrow, I plan to publish this mod on the Hex Truss thread. The ReadMe.txt file includes a paragraph acknowledging and thanking you for your help.

Link to comment
Share on other sites

  • 7 months later...
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...