Jump to content

Solar Panel always faces edge-on to sun


Recommended Posts

helloo I am having a rather confusing issue with the solar panels I am making, after having made some with no issues at all now these new ones always face edge on to the sun, no matter what the local orientation of the object set as raycastTransform is, I have redone the animation multiple times after changing local orientations of panels in blender and tried it with z+ x+ and y+ facing the way I want and yet the panels ALWAYS face the same way irrespective of this. Is there something I am missing to do with what needs to be facing z+?

I have also tried making an empty in unity and parenting it to a panel and changing its local orientation and setting that as raycastTransform with the same result, always the same edge points to the sun...

ok I have done this over and over now, remade it from the ground up making sure everything is lined up the same as the set i made that work, no matter what happens they just point edge on! really confused, thought maybe it was the config because that is the only thing that has remained the same over the multiple version but i can't see anything in it that could possibly cause this so I am stumped.

Edited by Squiggsy
Link to comment
Share on other sites

If raycastTransform is the object that rotates dynamically in the game then obviously rotating it in Unity wont work, right? I've never done panels before but if I had to guess you need to rotate the hierarchy UNDER that parent not the parent itself.

Link to comment
Share on other sites

If raycastTransform is the object that rotates dynamically in the game then obviously rotating it in Unity wont work, right? I've never done panels before but if I had to guess you need to rotate the hierarchy UNDER that parent not the parent itself.

hmm but surely since its the local orientation I'm changing (in blender) and the local orientation moves with the object, it will always be the same relative to the object regardless of dynamic movement?

the problem is that with panels you have to make a parent chain going from the last panel up the chain to the main parent which is the pivot point, and changing the local orientation of the pivot point will change the way it pivots, which ruins the whole thing.

then again i get very confused trying to get my head around roations in unity and blender because orientations change from one to the other, the thing that is really odd is that I looked back at my first set of panels that work fine and sorted all the local orientations so they were the same as that one, re animated it and still got the exact same result,

Link to comment
Share on other sites

I'm pretty sure the game rotates this object absolutely, not incrementally from what you set it. You're not setting anything. It's like the lookAt constraint. No amount of rotation is going to make a difference.

- - - Updated - - -

Show your hierarchy

Link to comment
Share on other sites

tumblr_nnzo2s2Laq1r0o48lo1_1280.png

here's the hierarchy

tumblr_nnzoipz9NN1r0o48lo1_540.png

and here it is deployed with the local Z+ of what I have set as the raycasttransform facing out from the panel like i'm pretty sure it should.

Edited by Squiggsy
Link to comment
Share on other sites

oh I thought the pivot point aims the panel but the raycasttransform tell the panel which way to face?

that could make a lot of sense actually the Z+ of the pivot point is facing the direction that the panels are aiming in game.

does the raycasttransform just determine what area needs to be exposed to light to get power from then?

ah yes actually looking at the one i got to work that is indeed the way its pivot is facing, i overlooked that completely because i was focusing on the raycasttransform

time to undo my animation and parenting in blender and reorient the pivot and try again then!

Edited by Squiggsy
Link to comment
Share on other sites

I COULD KISS YOU RIGHT NOW NERTEA

but that would be weird :P instead I will say a massive thank you, that is exactly what my problem was.

To summarize encase someone comes across this forum post suffering the same problems :

The object set as solar pivot will rotate along its local Y axis and make its local Z+ axis face the sun.

raycastTransform does not determine this (pretty sure the tutorial post on it says that it does, or at least a comment somewhere in it does)

thanks again! now I am nearly ready for a release of my aeroplane launched MiniRocket & MicroSat :D

Edited by Squiggsy
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...