|
Grantly Hamilton
Registered User
Join date: 31 Mar 2004
Posts: 38
|
12-06-2006 09:18
Are there any that work the same as while editing an object, holding shift + ctrl and dragging the object to the new size without changing it's rotations etc... or do I have to figure out the math behind it?
I tried to search for examples, but no beans...
Any input would be appreciated...
Thanks.
- Grantly
|
|
Jesse Barnett
500,000 scoville units
Join date: 21 May 2006
Posts: 4,160
|
12-06-2006 09:57
You can use llSetScale BUT per the wiki "There is no simple way to scale a whole linked object. Scale each individual child prim and adjust its position in relation to the parent prim."
So no, you can not set scale for a whole object. And yes if you were to use scripts in each individual prim to set scale you would have to figure out the math for the new offsets.
_____________________
I (who is a she not a he) reserve the right to exercise selective comprehension of the OP's question at anytime. From: someone I am still around, just no longer here. See you across the aisle. Hope LL burns in hell for archiving this forum
|
|
Grantly Hamilton
Registered User
Join date: 31 Mar 2004
Posts: 38
|
12-06-2006 10:05
Damn... lol
|
|
Deanna Trollop
BZ Enterprises
Join date: 30 Jan 2006
Posts: 671
|
12-06-2006 14:48
Well, as far as the math is concerned, you don't even need to deal with rotations. It's just a matter of multiplying llGetLocalPos() and llGetScale() by the scale factor, for each prim involved. For example, if you're scaling up by 1.5 from the starting size, then in each child prim you'd do something like: llSetPos( llGetLocalPos() * 1.5 ); llSetScale( llGetScale() * 1.5 );
Or you could do them "simultaneously" in a single llSetPrimitiveParams call. Of course, as with anything else in LSL, the overall scaling wouldn't be simultaneous. Each individual prim would scale and translate separately as the sim parses their link_message events, which will be more pronounced under heavy lag.
|
|
Grantly Hamilton
Registered User
Join date: 31 Mar 2004
Posts: 38
|
12-07-2006 12:21
From: Deanna Trollop Well, as far as the math is concerned, you don't even need to deal with rotations. It's just a matter of multiplying llGetLocalPos() and llGetScale() by the scale factor, for each prim involved. For example, if you're scaling up by 1.5 from the starting size, then in each child prim you'd do something like: llSetPos( llGetLocalPos() * 1.5 ); llSetScale( llGetScale() * 1.5 );
Or you could do them "simultaneously" in a single llSetPrimitiveParams call. Of course, as with anything else in LSL, the overall scaling wouldn't be simultaneous. Each individual prim would scale and translate separately as the sim parses their link_message events, which will be more pronounced under heavy lag. OK, works like a charm, I just have to tweak a little(re-center, etc). I tried everything before multiplying it... duh! I need to re-learn math again, lol. Thanks
|