Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

llGetPos() in attached prim does not give region coordinates

Whenever Timeless
Registered User
Join date: 23 Oct 2007
Posts: 6
01-28-2009 17:58
The documentation for llGetPos() from LSLwiki says "When called from within a child prim in a linked set, it returns the position of the child in region coordinates, not the parent's position."

However when i do that it does not give the position of the prim in the region, it seems to give the position of the prim in the region assuming I am standing up. Is the documentation wrong? ls llGetPos supposed to give a phantom prim position ignoring any movement do to a pose.

Can anyone shed any light on this?

Thank you

Whenever
Ruthven Willenov
Darkness in your light
Join date: 16 Jan 2008
Posts: 965
01-28-2009 18:10
poses are just animations, the server doesn't recognize position changes when it's an attachment moved by the animation. basically, llGetPos returns the agent's position, not sure if it's slightly different for different attach points but yeah. if you're trying to record an animation with prims, it won't work
Hewee Zetkin
Registered User
Join date: 20 Jul 2006
Posts: 2,702
01-28-2009 20:08
Right. The behavior for attachments is special. It is the position of the avatar. No, it does NOT change for different attach points. In many respects, positional and movement functions work in attachments like they are operating directly on the avatar.

Too bad there's no "avatar inventory" (as opposed to resident inventory where you keep stuff) like we have "prim inventory" to put scripts in directly; then maybe this kind of special treatment wouldn't be quite as necessary. Hmm. Do I sense an enhancement request JIRA coming on? LOL.
SuezanneC Baskerville
Forums Rock!
Join date: 22 Dec 2003
Posts: 14,229
01-28-2009 20:25
I recall posting about wanting to have scripts in avatars years ago.
_____________________
-

So long to these forums, the vBulletin forums that used to be at forums.secondlife.com. I will miss them.

I can be found on the web by searching for "SuezanneC Baskerville", or go to

http://www.google.com/profiles/suezanne

-

http://lindenlab.tribe.net/ created on 11/19/03.

Members: Ben, Catherine, Colin, Cory, Dan, Doug, Jim, Philip, Phoenix, Richard,
Robin, and Ryan

-
Whenever Timeless
Registered User
Join date: 23 Oct 2007
Posts: 6
01-29-2009 13:46
thank you for clarifying this for me.

Is there any way to measure how much an attached items rotation is changed when you change from one sit to another?
Void Singer
Int vSelf = Sing(void);
Join date: 24 Sep 2005
Posts: 6,973
01-30-2009 01:58
yeah.... guess =(

actually if it's a static pose you can use an unattached prim in the same position to get the avatars position and calculate the visible offset you see
_____________________
|
| . "Cat-Like Typing Detected"
| . This post may contain errors in logic, spelling, and
| . grammar known to the SL populace to cause confusion
|
| - Please Use PHP tags when posting scripts/code, Thanks.
| - Can't See PHP or URL Tags Correctly? Check Out This Link...
| -