Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Changing the size of prims without moving them

Django Yifu
Beat Island Gaffer
Join date: 7 May 2007
Posts: 189
08-02-2007 10:04
I would like to be able to resize a prim using llSetScale() without the prim moving it's position relative to the ground.

For example a candle burning down.

When you use llSetScale() the prim position is taken from the centre of the prim so objects begin to float above surfaces as they shrink. Of course llSetPosition() could be used but this will be jerky.

What I'm after is a command or section of code that will smoothly lower the height of the prim without making it appear to float as it shrinks.

Is there infact a smooth way of doing this?

I considered using changing textures with alphas but again this does not seem an elegant solution.

I have never seen this in SL before to my knowledge.
Talarus Luan
Ancient Archaean Dragon
Join date: 18 Mar 2006
Posts: 4,831
08-02-2007 10:10
Just to clarify... you DO want the prim to move when you shrink it in that case, because otherwise it looks like it is "melting from both ends". When you just use llSetScale, the prim does not move (its center) in relation to the ground.

Use llSetPrimitiveParams and set both PRIM_SIZE and PRIM_POSITION at the same time. That will prevent the "jerky" resizing in your situation.
Boss Spectre
Registered User
Join date: 5 Sep 2005
Posts: 229
08-02-2007 12:04
This thread contains a script to stretch a prim from one end only by moving the center:

/54/81/189490/1.html#post1544238
Squirrel Wood
Nuteater. Beware!
Join date: 14 Jun 2006
Posts: 471
08-03-2007 00:00
The trick to use here is to cut the prim in half. So that its center point "moves" to one end of it.

This, of course, implies that you will only be able to use half of the prims maximum size.
Hg Beeks
llGetElement(80);
Join date: 13 Apr 2006
Posts: 134
08-03-2007 15:15
I would suggest the same. A half a prim (Either cut 50% or using the sphere trick) with its center at the bottom would be the best way to ensure that it would shrink without having to be repositioned.