From: Coll Muggins
is it possible to stretch a prim on one side using a script and if so how could I possibly go about doing that?
i'll try to understand what you mean. it sounds like you tried llSetScale to stretch the prim. if you notice the center stays in the same place. in the edit window you can check/uncheck stretch both sides. i assume you want to stretch the prim as if you have it unchecked so that one side stays put and the opposite side gets moved and the other sides are stretched.
probably not a very good explanation of that lol, i'm not good at that, i tend to overcomplicate things if i try
anyways, if you understand that, and it is what you mean, you would stretch the object, and then move it by half of what you stretched so that one side stays put
the below script will stretch it along the z axis and then move it so that the bottom stays where it's at
vector stretch = <0.0,0.0,0.125>;
default
{
touch_start(integer num)
{
llSetScale(llGetScale()+stretch);
llSetPos(llGetPos()+(stretch/2)*llGetRot());
}
}
llSetScale(llGetScale()+stretch);
llSetPos(llGetPos()+(stretch/2)*llGetRot());
those 2 functions can also be replaced with:
llSetPrimitiveParams([PRIM_SIZE,llGetScale()+stretch,PRIM_POSITION,llGetPos()+(stretch/2)*llGetRot()])