Talk:LlSitTarget
Revision as of 04:46, 25 February 2008 by Strife Onizuka (talk | contribs)
Unsitting on wrong side or camera rotation
Hi, i am getting frustrated with this. I create a board and set the sit target with
llSitTarget(<0.4, 0.0, 0.0>, ZERO_ROTATION);
and an animation which for "standing". So while the person technical sits, she stands in front of the board. But I have a problem with that: If the board stand freely, the person unsits right through it towards the other side. I can put the board with the back facing a large wall. In the case the unsitting is correctly in front of it. But on sit down the camera rotates, so that it is behind the avatar again; on the other side of the wall.
If anyone has an idea how to fix, please tell me (even if it is just an idea where to look for more information). --Maike Short 12:41, 24 February 2008 (PST)
- You could position the camera with the Camera functions. -- Strife Onizuka 04:46, 25 February 2008 (PST)
Optimization
list GetSitTarget(integer prim, key av) {//WARNING: llGetObjectDetails can introduce an error that goes as far as the 5th decimal place. vector tp = llGetAgentSize(av); if(tp) { if(prim == LINK_THIS)//llGetLinkKey doesn't like LINK_THIS prim = llGetLinkNumber(); list details = OBJECT_POS + (list)OBJECT_ROT; rotation f = llList2Rot(details = (llGetObjectDetails(llGetLinkKey(prim), details) + llGetObjectDetails(av, details)), 1); return [(llRot2Up(f = (llList2Rot(details, 3) / f)) * tp.z * 0.02638) + ((llList2Vector(details, 2) - llList2Vector(details, 0)) / f) - <0.0, 0.0, 0.4>, f]; } return []; }//Written by Strife Onizuka