Hello. First, let me state up front that I'm a newbie and this is my first non-trivial script. However, I have tried to do a thorough research on the problem I'm having, but to no avail. The script that I'm writing is supposed to take an object composed of linked prims and shrink it. For the most part, I have gotten it to work reasonably well, but I have a complex object (109 prims) that for some reason, two of the prims won't move. Here is a snippet of code that gets executed in each of the child prims:
originalPos = llGetLocalPos();
pos = multiplyVec(originalPos, scale);
llSetPos(pos);
temp = llGetLocalPos();
if (temp != pos) {
llOwnerSay("\nWarning: asked for pos " + (string) pos +
" but got pos " + (string) temp);
llOwnerSay("original pos = " + (string) originalPos);
distance = llVecDist(originalPos, pos);
llOwnerSay("Distance = " + (string) distance);
llSetColor(<1.0, 0.0, 0.0>, ALL_SIDES);
}
For a badly behaving prim I get output from this that looks like:
[8:43] Object:
Warning: asked for pos <-0.09627, 0.12480, 0.08371> but got pos <-0.96270, 1.24800, 0.83710>
[8:43] Object: original pos = <-0.96270, 1.24800, 0.83710>
[8:43] Object: Distance = 1.606199
From this we see that the position asked for was the original position scaled down by a factor of 10, which is what is desired. But we also see that the llSetPos had no effect, the original position and the resultant position are the same. The requested move distance is small, so the 10m link distance shouldn't be a problem. Since the object is shrinking I can't be moving it below ground level (and the movement of the other parts confirms this). I've gone through each of the linkset rules and can't see that this move violates any. Plus, there are the other 107 prims which seem to position themselves correctly. Can anyone offer any suggestions? I've run out of ideas.
