Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

llSetPrimitiveParams

Jokey Domela
Registered User
Join date: 27 Jul 2005
Posts: 83
09-20-2005 16:17
Is there any way to change the scale of an object without "Stretching Both Sides"?

IE: A cube, has two faces x, 2 faces y, 2 faces z. I want to make a 1,1,1 cube be 10,1,1 but only move ONE face.
Zeno Concord
To infinity, and beyond!
Join date: 28 Mar 2005
Posts: 51
move with scale
09-20-2005 16:38
Scaling grows (or shrinks) the object equally in both directions. You will have to add half the amount you are increasing the scale by to the position to offset the object so that it appears one face remains in the same place. And to do both changes in a single operation, maybe use llSetPrimitiveParams.
Slayd Lemieux
Registered User
Join date: 9 Jul 2005
Posts: 29
One way
09-20-2005 16:44
As far as I know, you can't really move just one side as you were explaining. But you could fake it.

You'll have to use a llSetpos to move it 4.5(I believe) meters in the direction you'd want it to "stretch". May not be the exact solution you're looking for, as it'd jump a little. But the easiest way I can think of.
Keknehv Psaltery
Hacker
Join date: 11 Apr 2005
Posts: 1,185
09-20-2005 16:48
No, just put it inside the llSetPrimitiveParams call. Then you don't get jumps... it's the best way to combine rotations, scaling, and moving.

CODE

llSetPos(pos);
llSetScale(scale);
llSetRot(rot);
//okay

llSetPrimitiveParams([ PRIM_POSITION, pos,
PRIM_SIZE, scale,
PRIM_ROTATION, rot ]);
//much better