I can give the LSL script, for HiFy i dont have much workable.
But now you telling something i did not know ort forgot. Z is the wrong way ?! Always worked with only Y is wrong. but this possible explains the strange results maby to. the lsl script can look a bit messy, because its testing version.
vector offset = <0.0, 0.0, 0.0>;
float divide = 2;
float partsize = 10;
float speed = 0.1;
list targetpositions = ;
currentposition=<123., 180., 168.>;
touch_start( integer total_number )
startposition = currentposition+offset-<partsize/divide ,0.0 , 0.0>* rot;
centerposition = currentposition+offset-<0.0 ,0.0 , 0.0>* rot;
endposition = currentposition+offset+<partsize/divide ,0.0 , 0.0>* rot;
target_id = llTarget(<0,0,0>, 0.5);
llSetLinkPrimitiveParamsFast(LINK_SET,[PRIM_POSITION, startposition+offset+<m ,0.0 , 0.0>* rot ]);
What im trying todo.
I have the coordinate of the prim or entity and the rotation. bot are always center of the prim.entity. Im also knowing the size of the prim/entity. Now i need to know the coordinates of the prim/entity at the begin and end. Including the angle or rotation of the prim. I dont know the end coordinates, thats just what i need to calculate !