Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Mobile

Haruki Watanabe
llSLCrash(void);
Join date: 28 Mar 2007
Posts: 434
08-18-2007 13:56
Hey everyone...

I'm trying to build a «Mobile» - dunno, whether this is the right term in english - you know, one of these thingies that hang from the ceiling where a lot of stuff is attached, and everyting's revolving... (like in this picture http://www.shop4pilots.com/images/produkte/910020_g.jpg).

The problem is, that I can't attach more than one child prim that's revolving around it's axis and is attached to the end of another prim...

Let's see, if I can picture this :)

********** Prim 1 **********
**** Prim 2 *** **** Prim 3 ***
**** Prim 4 *** *** Prim 5 *** *** Prim 6 *** *** Prim 7 ***

(well after trying I found out that it only shows correct in Edit-Mode... hope you still get the picture... :)

So Prim 1 rotates around it's center
Prim 2 and 3 rotate around their center and also are rotated around Prim 1's center
Prim 4 and 5 rotate around their center and also around the center of Prim 2...

I can make it to the first level (Prim 2 and 3) - but as soon as I attach one more branch (Prim 4 and 5 / 6 and 7) it gets out of hand...

Any ideas how I could achieve this?
Lyn Mimistrobell
(waiting)
Join date: 11 Jan 2007
Posts: 179
08-19-2007 08:25
The only way I can see this working, is calculation the positions of prims 4 to 7 using sin and cos functions...
Haruki Watanabe
llSLCrash(void);
Join date: 28 Mar 2007
Posts: 434
08-19-2007 10:45
I was afraid getting an answer like this... :)
Jotheph Nemeth
Registered User
Join date: 9 Aug 2007
Posts: 142
08-19-2007 16:01
From: Haruki Watanabe
I was afraid getting an answer like this... :)



Maybe a script in each of the childs that does a rotation of itself?
Haruki Watanabe
llSLCrash(void);
Join date: 28 Mar 2007
Posts: 434
08-19-2007 16:48
well - there is actually a script in ever child that does the rotation - but the prim that are further down of the mobile need to rotate with the parent-prim as well... so in my example then child-prims of the last generation are rotating around 3 axes... sort of...
Senuka Harbinger
A-Life, one bit at a time
Join date: 24 Oct 2005
Posts: 491
08-19-2007 16:50
From: Jotheph Nemeth
Maybe a script in each of the childs that does a rotation of itself?


unfortunately the rotations will not be relative to each other as is desired in a mobile. you will have to do some mathematics to figure out the locations of the prims.
_____________________
My SLExchange shop

Typos are forgiven; desecrating the english language with reckless abandon and necrophilic acts is not.


The function is working perfectly fine. It's just not working the way you wanted it to work.
Tiarnalalon Sismondi
Registered User
Join date: 1 Jun 2006
Posts: 402
08-20-2007 07:01
You could just link each level separately and have them use a cylinder as the rotating prim and parent of each object and if you wanted the attached pieces to also 'spin' that should be doable with a TargetOmega.

Unfortunately, to have them do all of this as one linkset, you're looking at some math and it might not always line up just right...but as separate linksets it should be easy.

You can do this and still have it go to inventory as one object, or you could even have the parent of the mobile rez the levels so you can keep it as a single, non-multi-object, inventory item.
Haruki Watanabe
llSLCrash(void);
Join date: 28 Mar 2007
Posts: 434
08-20-2007 17:21
hmmm - sounds like an idea...
I'm gonna try that out...
Thanks a lot! :)