Jump to content

How to get global position and rotation from local vector and rotation (according the root prim)?


Creative Starfall
 Share

You are about to reply to a thread that has been inactive for 1243 days.

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

Recommended Posts

Hi:

I have an object with a root prim, and a child prim! Both prims have 1 script inside!

I have a vector that is the local position according to the root prim!
I also have a vector that is the local rotation according to the root ptim!

Now, I need to get the exactly same point (vector position/rotation), but this time according to the child prim!

In the child prim script I have the following code:
 

Quote

 

// Get message from the root prim script
vector T_Pos = (vector)C2; // Target Position (local vector according the root prim)
rotation T_Rot = (rotation)C3; // Target Rotation (local rotation according the root prim)

list RootDetails = llGetLinkPrimitiveParams(LINK_ROOT, [PRIM_POSITION, PRIM_ROTATION]);
vector RootAbsPos   = llList2Vector(RootDetails, 0); // Get the root prim absolute coordinates
rotation RootAbsRot = llList2Rot(RootDetails, 1); // Get the root prim absolute rotation

 

 

#1) Now, using these values, how to find the global position and rotation of the Target?

#2) How to get the exactly same point, but now the local position and rotation according the child prim?

 

Thank you for the help!

Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 1243 days.

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

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share

×
×
  • Create New...