Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Rotating Child object around root prim, help!

Trey Harris
Registered User
Join date: 28 Mar 2006
Posts: 8
12-03-2006 10:11
Is their a way to rotate a child prim around the root prim in a link set? Example would be say the Root prim is the Sun and the child is earth, Is there a way to make the earth rotate around the sun, with the sun(root prim), as the center point.
Strife Onizuka
Moonchild
Join date: 3 Mar 2004
Posts: 5,887
12-03-2006 12:14
You will find that if you search this forum, there are a number of threads on this topic already.
_____________________
Truth is a river that is always splitting up into arms that reunite. Islanded between the arms, the inhabitants argue for a lifetime as to which is the main river.
- Cyril Connolly

Without the political will to find common ground, the continual friction of tactic and counter tactic, only creates suspicion and hatred and vengeance, and perpetuates the cycle of violence.
- James Nachtwey
Talarus Luan
Ancient Archaean Dragon
Join date: 18 Mar 2006
Posts: 4,831
12-03-2006 15:25
Well, yes and no.

You can make an orbital (planet child prim) orbit around a center root prim (sun), and you can make the planet rotate on its axis.

However, you cannot have multiple planets doing the same thing in one link set, as they will all turn in unison.

Using llTargetOmega in the root prim will make the whole link set spin, and llTargetOmega in a child prim will make only that child prim spin on its own axis.

So, making a single linkset solar system is out (one of the first projects I tried to do many moons ago), but a single linkset with only one planet going around a star works fine.
Escort DeFarge
Together
Join date: 18 Nov 2004
Posts: 681
12-03-2006 16:04
To get a "true" orbit I'd guess you should look at using llSetLocalPos updated on a timer with llSin and llCos to get the offset x/y... but getting it smooth will have you pulling hair out.
_____________________
http://slurl.com/secondlife/Together
RobbyRacoon Olmstead
Red warrior is hungry!
Join date: 20 Sep 2006
Posts: 1,821
12-03-2006 16:25
From: Talarus Luan
making a single linkset solar system is out (one of the first projects I tried to do many moons ago)

Hahahaha. That made me chuckle, thanks :)
Trey Harris
Registered User
Join date: 28 Mar 2006
Posts: 8
Thanks for th input!
12-04-2006 14:24
llSetLocalPos() Dont seem to be a valid SL function. I really just want to rotate a single child prim around the root prim. I have looked at the example of rotating an object around a fixed position and got that to work, but can not figure out how to rotate a linked object around its root prim. Any examples would be great. Thank you for the advice!