Please take a moment to consider if this thread is worth bumping.

## Recommended Posts

Hi:

Quote

vector localPos = <0.13982,-0.02822,1.79004>;
vector localRot = <0,0,22>;

HOW TO MAKE THESE CALCULATIONS? <-------------

Thank you!

##### Share on other sites

Well, first use legitimate rotations.  The values you are using are all vectors.  So, either replace them with rotations or use llEuler2Rot to convert them.

##### Share on other sites

1 hour ago, Rolig Loon said:

Well, first use legitimate rotations.  The values you are using are all vectors.  So, either replace them with rotations or use llEuler2Rot to convert them.

Can you please tell me if this code is ok?

Quote

vector t_Pos = (((llList2Vector(PosInit, i)-llList2Vector(AdjP, i))-llGetRootPosition())) / llGetRootRotation();
t_Pos = llGetRootPosition() + t_Pos * llGetRootRotation();

rotation t_Rot = childRot / llGetRootRotation();
t_Rot = t_Rot * llGetRootRotation();

llSetLinkPrimitiveParamsFast(llList2Integer(BDLnk, i), [PRIM_POS_LOCAL, t_Pos, PRIM_ROT_LOCAL, t_Rot]);

I'm not sure about / or * signs!

##### Share on other sites

It looks reasonable, although you should be using llGetRot instead of llGetRootRot.  The best way to find out whether it is doing what you hope is to try it out and see.  In the end, that's the test you want to satisfy

Edited by Rolig Loon
• 1
• 1