llLinkSitTarget
llLinkSitTarget(integer link,// Link number (1 for root, >1 for children) or a LINK_* flag. Values: Linkvector offset,// Offset position vector in local prim coordinates.rotation rot// Rotation relative to the prim's rotation.
);- Energy
- 10
Sets the sit target position (offset) and orientation (rot) for the linked prim link, relative to the prim's own position and rotation. Clear by setting offset to <0.0, 0.0, 0.0>.
Set the sit location for the linked prim(s). The sit location is relative to the prim’s position and rotation.
If offset == <0.0, 0.0, 0.0> then the sit target is removed.
llLinkSitTarget(0, ZERO_VECTOR, ZERO_ROTATION);Specification
Section titled “Specification”llLinkSitTarget sets the position for the Agent Target (Develop -> Avatar -> Display Agent Target in the version 3.x viewer, Develop -> Character -> View Agent Target in older viewers). The position of the target is based on rot and the offset1.
Caveats
Section titled “Caveats”- link needs to be
LINK_THISfor an unlinked prim. SpecifyingLINK_ROOT(integer value 1) will not work. - Once a sit target is removed
llAvatarOnLinkSitTargetwill only returnNULL_KEY. - Removing or deactivating the script that sets the sit target will not remove the prim’s sit target.
- Sit target is a prim property and not dependent on a script for its continued existence.
- To remove sit target, use the following:
:
llLinkSitTarget(linkNum, ZERO_VECTOR, ZERO_ROTATION);- There is no way to remove the Sit option from the pie menu. It will appear to be removed if the
llSetSitTextis set to a space ” ” or similar transparent string. - Attachments cannot be sat upon (see SVC-6100 to vote for such a feature).
- rot affects the position of the sit-target in a buggy way. To correct for the rot bug, subtract
<0.0, 0.0, 0.4>from the position when rot is zero. See example inllSitTarget. This offset is<0.0, 0.0, 0.418>on OpenSimulator 0.7.6 (it’s 0.4 on version 0.8), but there is more to it than just this offset (opensim and SL remain incompatible). You can find the gory details and an example here.- llSetLinkPrimitiveParams is a more difficult workaround.
- Animations are relative to the Agent Target, but the Agent Target isn’t described by the animation.
llSitTargetdoes not update position of an already seated avatar. See UpdateSitTarget for a way to do this.- offset is limited to 300.0 meters on each axis. The x, y and z components must be in the range [-300, 300.0].
- If they are outside the acceptable range they are rounded to the closest limit.
- If an object has multiple seats (each seat has a script that sets a sit target with
llSitTarget, or the link set has a script that assigns several *llLinkSitTarget*s), the following method determines which sit target an avatar ends up at:- If the prim that is clicked on has a sit target and that sit target is not full, that sit target is used.
- If the prim that is clicked on has no sit target, and one or more other linked prims have sit targets that are not full, the sit target of the prim with the lowest link number will be used.
History
Section titled “History”Date of Release 10/08/2011
See also
Section titled “See also”Functions
Section titled “Functions”Events
Section titled “Events”Original wiki source
Some wiki templates and tables need their original context. View this article on the Second Life Wiki. Technical wording and examples are retained from the source; historical guidance may differ from current behavior.