|
Frech Ennui
Registered User
Join date: 5 Apr 2005
Posts: 7
|
06-10-2006 16:01
Ok I have what I feel to be an easy problem, but regardless it seems to elude me. I need to be able to position a single prim in the center of a group of linked prims. For example, I have a a hollow hexagon made up of 8 box prims linked together. I need to be able to position a single sphere prim in the center of the hexagon. I've tried querying the hexagon prim for it's position, it's geographic center, and it's rotation, but nothing seems to do any good  Anyone have any ideas/solutions to this seemingly simply problem?? Thank you!! Frech
|
|
Keknehv Psaltery
Hacker
Join date: 11 Apr 2005
Posts: 1,185
|
06-10-2006 17:23
It's geometric center, not geographic.
What I would recommed is doing (prim1+prim2+prim3+prim4+prim5...)/nPrims, so you find the average position. Theoretically, that should get the center of the set.
|
|
Frech Ennui
Registered User
Join date: 5 Apr 2005
Posts: 7
|
06-24-2006 08:10
From: Keknehv Psaltery It's geometric center, not geographic.
What I would recommed is doing (prim1+prim2+prim3+prim4+prim5...)/nPrims, so you find the average position. Theoretically, that should get the center of the set. Tried this, still not working. It gets consistant results, but it places the prim I need centered nowhere near the true center. Could it have anything to do with the prims being rotated as they go around the center?? Still pursuing a solution...
|
|
Frech Ennui
Registered User
Join date: 5 Apr 2005
Posts: 7
|
06-27-2006 21:02
From: Frech Ennui Tried this, still not working. It gets consistant results, but it places the prim I need centered nowhere near the true center. Could it have anything to do with the prims being rotated as they go around the center?? Still pursuing a solution... Nevermind, it works wonderfully. Thank you!! I was calling llBreakLink before dividing the resulting value by the number of prims. I was therefore only dividing by 1 since I was now de-linked.
|