Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

orbits, rotations and workarounds

Alisha Matova
Too Old; Do Not Want!
Join date: 8 Mar 2007
Posts: 583
12-24-2008 12:52
A few days ago a thread came through this forum asking how to add a rotating linkset to an object. /54/3c/298857/1.html

The particular object was a snow globe, with a rotating moon...but that is not so important.

The solution we came up with IMO is not so elegant.

For simplicity reasons we made the globe Rez the moon every 5 minutes or so, and the moon itself llDies on the same 5 minute timer.
This does work, and allows the globe to be moved without loosing the moon...or if it is lost, a new moon appears and the old one dies. but... there has to be a better way.

To me is seems 2 sensors, one in the moon and one in the globe is the best way to do this. Example-- IF the globe senses no moon it rezzes one, and IF the moon senses no globe it llDies.

I suppose My 3rd idea would be to actually orbit the moon with math...(please don't say this, as the math is beyond me atm) But if its the best least resource using way, i will have to learn.

My question...What would be more resource hoggish....2 sensors on timers....or simply rezzing a new moon every 5 minutes?... or the math orbit way?

TIA
Alisha =)

Oo0 and Happy Holidays all!!
Destiny Niles
Registered User
Join date: 23 Aug 2006
Posts: 949
12-24-2008 14:24
The senor that triggers at every 5 minutes looks like the kindness sim resource way to go.
Or another way may to be have the base detect when it's moved and send the new location to the moon, and have the moon adjust it's position.
Forget the math, the rotation script is the best way to orbit the moon, let the system do all the math work for you.
Alisha Matova
Too Old; Do Not Want!
Join date: 8 Mar 2007
Posts: 583
12-24-2008 15:04
Thank You Destiny =)

I really like your idea of sending the new location to the rotating bits. That combined with a sensor(maybe with a much longer timer) that rezzes if needed sounds like a winner. I think i still need that, in case the globe is picked up minus the moon.

Sounds like a fun holiday project =)
Void Singer
Int vSelf = Sing(void);
Join date: 24 Sep 2005
Posts: 6,973
12-25-2008 13:26
the generalized formula I provided in your other thread can be adapted to an attached child prim, just beware of SVC-93, which details a bug and workaround involving childprim rotations.

also, instead of a sensor, you could just have the objects talk to each other, reporting position... in fact, you could do all the math in the globe, and just report the position to move to to the moon, having the moon only check for distance of the move (allowing it to die if out of range)
_____________________
|
| . "Cat-Like Typing Detected"
| . This post may contain errors in logic, spelling, and
| . grammar known to the SL populace to cause confusion
|
| - Please Use PHP tags when posting scripts/code, Thanks.
| - Can't See PHP or URL Tags Correctly? Check Out This Link...
| -