03-17-2013 05:34 PM
Hello there Nubby McNewb here looking for some help.
I am currently trying to link together multiple objects with their own rotation scripts. The rotations have already been set for each object and all is well. However when i put them together the scripts seem to colide or something and instead of the objects maintaing their rotations the one parent prim begins to spen and everything else takes its default state and just sits there.
I have seen some topics on this or related to it I think... In the end I was very confused as nobody seems to xplainthings in simplified terms and not quite sure if I was looking at an answer and if so the oneI needed.
I believe I grasped the concept of using "llSetLinkPrimitiveParamsFast" in a new parent object and then linking everything too it to make the rotations maintain their independence. Is this close? Btw if it is could someone be kind enough to write down the script itself? I know nothing about making LSL scripts just how to alter a few numbers and what not.
03-17-2013 05:57 PM
You have to be very careful how you link the prims
The root prim must be the one that is not spinning
If it is spinning all the child prims will spin with it
The root prim is the last prim linked in the linkset
03-17-2013 06:04 PM - edited 03-17-2013 06:14 PM
So make another prim. Round up al the originals, and slap them onto the new prim?
Ok then getting results. I have all the rotation prims linked to the one, However now the outter prims that I had linked to the inner rotation prims are linked to the one master prim and will no longer spin with the inner orbs. What do I do to get the outter orbs to spin around with the inner rotation without seperating them again?
03-18-2013 12:29 AM - edited 03-18-2013 12:29 AM
What exactly are you trying to make? Do all the child prims stay in fixed positions, simply rotating on their own axes, or do some of them orbit round others?
I'm confused by " the outter prims that I had linked to the inner rotation prims are linked to the one master prim and will no longer spin with the inner orbs" -- what do you want them to do?
03-18-2013 07:12 AM
Sounds as if something like an Orrery is intended.
If things haven't changed over the last few years - as I understand it, hierarchical linking isn't possible in LSL.
Here's a link to the archived forum that relates: http://forums-archive.secondlife.com/54/39/301270/
03-18-2013 08:25 AM
It sounds like that's exactly what the OP is trying to do -- getting moons to rotate around their own axes while revolving around a rotating planet. AFAIK, there's still no way to do that in SL.
03-18-2013 09:00 AM - edited 03-18-2013 09:19 AM
So long as all the objects rotate about the same axis, and only that axis, everything will work. If you don't mind ignoring off-axis rotations of celestial bodies such as the Earth, an orrery is easy to make. I suspect the OP has something else in mind. llTargetOmega is a viewer side operation that rotates a prim about the orientation that prim has at invocation. So long as every object in a linkset is rotating about one and the same axis, that axis' orientation does not change and all the children spin correctly (which rarely happens in RL).
ETA: As Carbon notes, hierarchical linking is not possible in SL, so all child prims must orbit the root, though they can spin at different rates. If you wanted to construct different orbital periods for the children, you'd have to co-locate multiple parent-child (sun-planet) objects, each with different root-prim rotation rates.
ETA2: I'm in-world at the moment, trying to locate Pandora Wrigglesworth's orrery at her Curio Obscura store. I recall scratching my head over hers years ago, so she may have done something we all think is impossible.
It might be worth getting one to get a glimpse of how Pandora did it. She's got a tilted Earth in her orrery. I expect all the planets orbit and rotate at different rates. My understanding of the limits of SL would require this to be a collection of separate Sun/Planet linksets, but I recall my headscratching resulted from looking at this thing in-world and seeing that it was one linkset.
10-26-2013 08:11 PM
Sorry for the late follow up but it only took me, errrr, 7 months to find how to do this:
Once one understands how this (excellent!) script works, they can do almost anything using LSL's limited link system, whether it be an orrery, giant spider NPC or whatever. The author lays it all out in the code, albeit w/o desirable comments (which one can surmise after a bit of study. Thank you, Nexii Malthus, for making some of us think!).