|
Sandrine Repine
Registered User
Join date: 20 Jul 2007
Posts: 2
|
08-14-2008 13:14
Hi !
I need a function to convert local corrdinates of a linked prim to global coordinates. I tried this :
vector globalPos = llGetRootPosition() + localPos * llGetRootRotation();
But dont works...
Thanks for help...
|
|
Osgeld Barmy
Registered User
Join date: 22 Mar 2005
Posts: 3,336
|
08-14-2008 21:13
llGetRegionCorner() + llGetPos();
get region corner will tell you the global coords of the SW corner of the sim then you can add the local pos to that to get your global pos for that particular object
|
|
Hewee Zetkin
Registered User
Join date: 20 Jul 2006
Posts: 2,702
|
08-14-2008 21:53
Hmm. Usually when people say "global coordiates" they mean region coordinates, not world coordinates. I believe the expression in the original post should actually be correct. At least, that transforms a point from the ROOT prim's coordinates to region coordinates. What makes you say it doesn't work Sandrine?
|
|
Sandrine Repine
Registered User
Join date: 20 Jul 2007
Posts: 2
|
08-15-2008 00:42
From: Hewee Zetkin Hmm. Usually when people say "global coordiates" they mean region coordinates, not world coordinates. I believe the expression in the original post should actually be correct. At least, that transforms a point from the ROOT prim's coordinates to region coordinates. What makes you say it doesn't work Sandrine? Sorry, my function is perfect, i Just tried it on simple script... There is a problem in another place in my code and i was not looking for the good one ! Thanks for your answer. Now i know where the problem is not...
|