Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Rotation of Avatar on SitTarget? HELP!

Sofia Weir
Registered User
Join date: 5 Feb 2007
Posts: 26
03-06-2007 06:40
Hello

I have this issue: I need to create a piece of furniture which needs to accomodate more than one "actors" sitting in different places on it performing different animations, AND facing in different directions while they are on Sitting positions.

Similar effect can be accomplished by the use of poseballs linked in different parts of the furniture and cunningly rotated in such angles that the avatars who sit on the poseballs face where we need them to face.
For example in the case of a sex bed, where the partners need to face each other, or not depending on the sex position.

Same effect can be achieved without poseballs, by the use of the furniture itself and a llDialog from which the "sitters" can choose their position.

Each sitter will have a different sit target. My problem is that the offeset on llSitTarget()works ok, but the rotation of the sit target does not!!...

I havent got the theory well or something, but I try to replace the ZERO_ROTATION with a vector for 90degrees or so, and the debugger responds"syntax error" when i try to use
rotation functions like lleulToRot or such.

Does anybody has a piece of script/example where a sit Target with rotation is used?.
OR
are there any other ways to have this result without poseballs?


Thanx a lot.

PS: I had this thought: If there are hidden poseballs, but the user sits on them when he sits on the furniture?. I mean not sitting on them directly, but the script assigns to the avatar the ball's sitting position?
Newgate Ludd
Out of Chesse Error
Join date: 8 Apr 2005
Posts: 2,103
03-06-2007 06:59
When you say the rotation does not work do you mean you get an unexpected result or just that it doesnt do anything at all?

Both parameters are relative to the prim, not global/world.
Code fragments taken from a script I have in inventory - never used it though.
CODE

// llSitTarget parameters:
vector avPosition = <0.0,0.0,-0.6>; // position of avatar in vehicle, relative to parent
rotation avRotation = <0,-0.2,0,1>; // rotation of avatar, relative to parent

default
{
state_entry()
{
llSitTarget(avPosition, avRotation); // Position and rotation of driving avatar.
}
}
Learjeff Innis
musician & coder
Join date: 27 Nov 2006
Posts: 817
03-06-2007 07:28
Search this forum for "+easy +sit +target" (omit the quotes).

That gives you an easy tool for figuring out sit target positions and rotations.