CODE
llSitTarget(vector offset, rotation rot)
llSitTarget allows you to define the position and rotation of an avatar sitting on a scripted object.
When an object has a sit target, the first avatar that tries to sit on it will sit in a position and rotation relative to the center of the scripted primitive. A offset of <0,0,0> will disable the sit target, returning the object to the default sitting behavior. A rot of <0,0,0,1> (or ZERO_ROTATION) will make you sit facing the local X axis, head toward the local Z axis.
Each primitive may have one sit target. This means sit targets may be applied to children as well as parents (making it possible to make multi-passenger vehicles). A sit target on a child prim needs to be set up relative to that child prim.
If a object has multiple prims, and several have sit targets, the avatar will sit on the a chosen prims target, or if that fails, the next open sit target prim, or if that fails revert to default sit behavior. This means that if you right click on the object, depending on where you right click, where you sit will be determined. If you chose "Sit" on a primitive without a target assigned, you will sit on the lowest linknumberd primitive in the set that has a sit target (often the parent) unless that prim is already occupied, in which case, you will sit on the next, and so on. If you choose to sit on a prim with a target, you will sit on that prim no matter what the link order is unless it is occupied, in which case, start running through the same cycle. If all of the seats are occupied, you try to sit in the default way defined by face and orientation from the seater.
You can use llAvatarOnSitTarget() to return the key of the seated avatar, and change the camera of the seated av by using llSetCameraAtOffset and llSetCameraEyeOffset.