Thanks James, works perfectly. :) Hugs.<br><br><div class="gmail_quote">On Fri, May 25, 2012 at 10:42 AM, James Hughes <span dir="ltr"><<a href="mailto:jamesh@bluewallgroup.com" target="_blank">jamesh@bluewallgroup.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
Here are a couple of scripts to help you with the sit position...<br>
<br>
<br>
Place this script in the object you want to set the sit position for...<br>
<br>
// Sit target system by Lex Neva. Please distribute willy-nilly.<br>
<br>
default<br>
{<br>
    touch_start(integer total_number)<br>
    {<br>
        llSensor("Sit Target Helper",<br>
                NULL_KEY, ACTIVE|PASSIVE, 96, PI);<br>
        llSay(0, "Searching for Sit Target Helper...");<br>
    }<br>
<br>
    no_sensor()<br>
    {<br>
        llSay(0, "Sit Target Helper not found. No sit target set.");<br>
        llSitTarget(ZERO_VECTOR, ZERO_ROTATION);<br>
    }<br>
<br>
    sensor(integer num)<br>
    {<br>
        if (num > 1)<br>
        {<br>
            llSay(0, "Multiple Sit Target Helpers found. Using closest helper.");<br>
        } else {<br>
            llSay(0, "Sit Target Helper found. Setting sit target.");<br>
        }<br>
<br>
        vector helper_pos = llDetectedPos(0);<br>
        rotation helper_rot = llDetectedRot(0);<br>
<br>
        vector my_pos = llGetPos();<br>
        rotation my_rot = llGetRot();<br>
<br>
        // calculate where the avatar actually is<br>
        vector avatar_pos = helper_pos + <0,0,1> * helper_rot;<br>
        // due to helper's sit target<br>
        avatar_pos = avatar_pos - <0,0,0.186> + <0,0,0.4> * helper_rot;         // correct for a bug in llSitTarget(), for helper sit target<br>
<br>
        vector target_pos = (avatar_pos - my_pos) / my_rot;<br>
        target_pos = target_pos + <0,0,0.186>/my_rot - <0,0,0.4>; //       correct for the bug again, this time in my sit target<br>
        rotation target_rot = helper_rot / my_rot;<br>
<br>
        llSitTarget(target_pos, target_rot);<br>
        llSay(0, "llSitTarget(" + (string)target_pos +<br>
                    ", " + (string)target_rot + ");");<br>
    }<br>
<br>
    changed(integer change)<br>
    {<br>
        if (llAvatarOnSitTarget() != NULL_KEY)<br>
            llRequestPermissions(<u></u>llAvatarOnSitTarget(),<br>
                PERMISSION_TRIGGER_ANIMATION);<br>
    }<br>
<br>
    run_time_permissions(integer perm) {<br>
        string anim = llGetInventoryName(INVENTORY_<u></u>ANIMATION, 0);<br>
        if (anim != "")<br>
        {<br>
            llStopAnimation("sit");<br>
            llStopAnimation("sit_generic")<u></u>;<br>
            llStopAnimation("sit_female");<br>
            llStartAnimation(anim);<br>
        }<br>
    }<br>
}<br>
<br>
<br>
Make a "Sit Target Helper"...<br>
<br>
Create a sphere and shrink it to about 0.25 and set the name of the object to "Sit Target Helper". Place this script inside it. And if you will be using an animation in your object, then place it inside this "Sit Target Helper" too. It will play the animation while you make the adjustment.<br>


<br>
<br>
Make the sit position adjustment...<br>
<br>
You will sit the avatar on this object and move it around until you are at the position you want. When you are satisfied with the adjustment, touch the object that you placed the above script in. It will print the llSitTarget command in chat with the right parameters for your adjustment. Use that llSitTarget in your object and remove the helper script.<br>


<br>
<br>
<br>
default<br>
{<br>
    state_entry()<br>
    {<br>
        llSitTarget(<0,0,1>, ZERO_ROTATION);<br>
    }<br>
<br>
    changed(integer change)<br>
    {<br>
        if (llAvatarOnSitTarget() != NULL_KEY)<br>
            llRequestPermissions(<u></u>llAvatarOnSitTarget(),<br>
                                PERMISSION_TRIGGER_ANIMATION);<br>
    }<br>
<br>
    run_time_permissions(integer perm)<br>
    {<br>
        string anim = llGetInventoryName(INVENTORY_<u></u>ANIMATION, 0);<br>
        if (anim != "")<br>
        {<br>
            llStopAnimation("sit");<br>
            llStopAnimation("sit_generic")<u></u>;<br>
            llStopAnimation("sit_female");<br>
            llStartAnimation(anim);<br>
        }<br>
    }<br>
}<br>
<br>
<br>
<br>
Hope that helps,<br>
<br>
BlueWall<div class="im"><br>
<br>
<br>
On 05/25/2012 06:51 AM, Dr Ramesh Ramloll wrote:<br>
> Hello,<br>
> I did not feel confident about stable solutions regarding how to get an<br>
> avie to sit properly on a mesh object after reading<br>
> <a href="http://opensim-dev.2196679.n2.nabble.com/Sit-position-changes-in-OpenSimulator-b6df9e9-Sat-5th-Nov-2011-td7056247.html" target="_blank">http://opensim-dev.2196679.n2.<u></u>nabble.com/Sit-position-<u></u>changes-in-OpenSimulator-<u></u>b6df9e9-Sat-5th-Nov-2011-<u></u>td7056247.html</a><br>


><br>
> dated nov 5 2011. I would like to hear from users who are sitting<br>
> perfectly fine in their opensim worlds ... how did you do it?<br>
> It's a little funny, I have transferred fairly complicated stuff into<br>
> opensim that work with some relief, and now I hit the sit target problem,<br>
> and I feel a little frustrated.<br>
> Any help deeply appreciated.<br>
> Regards<br>
> Ramesh<br>
><br>
> --<br>
> 'Consider how the lilies grow. They do not labor or spin.'<br></div>
> *Rameshsharma Ramloll* PhD, CEO CTO DeepSemaphore LLC, Affiliate<br>
> /Research Associate Professor/, Idaho State University, Pocatello, ID<br>
> 83209 Tel: <a href="tel:208-240-0040" value="+12082400040" target="_blank">208-240-0040</a><br>
> Blog <<a href="http://deepsemaphore.posterous.com/" target="_blank">http://deepsemaphore.<u></u>posterous.com/</a>>, LinkedIn<br>
> <<a href="http://www.linkedin.com/in/rameshramloll" target="_blank">http://www.linkedin.com/in/<u></u>rameshramloll</a>>, DeepSemaphore LLC<br>
> <<a href="http://www.deepsemaphore.com" target="_blank">http://www.deepsemaphore.com</a>><u></u>, Google+ profile<br>
> <<a href="https://plus.google.com/103652369558830540272/about" target="_blank">https://plus.google.com/<u></u>103652369558830540272/about</a>><br>
><br>
><br>
><br>
> ______________________________<u></u>_________________<br>
> Opensim-users mailing list<br>
> <a href="mailto:Opensim-users@lists.berlios.de" target="_blank">Opensim-users@lists.berlios.de</a><br>
> <a href="https://lists.berlios.de/mailman/listinfo/opensim-users" target="_blank">https://lists.berlios.de/<u></u>mailman/listinfo/opensim-users</a><br>
<br>
______________________________<u></u>_________________<br>
Opensim-users mailing list<br>
<a href="mailto:Opensim-users@lists.berlios.de" target="_blank">Opensim-users@lists.berlios.de</a><br>
<a href="https://lists.berlios.de/mailman/listinfo/opensim-users" target="_blank">https://lists.berlios.de/<u></u>mailman/listinfo/opensim-users</a><br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><font color="#999999">'Consider how the lilies grow. They do not labor or spin.'</font><br><b>Rameshsharma Ramloll</b> PhD, CEO CTO DeepSemaphore LLC, Affiliate <i>Research Associate Professor</i>, Idaho State University, Pocatello, ID 83209 Tel: 208-240-0040<br>

<div><a href="http://deepsemaphore.posterous.com/" target="_blank">Blog</a>, <a href="http://www.linkedin.com/in/rameshramloll" target="_blank">LinkedIn</a>, <a href="http://www.deepsemaphore.com" target="_blank">DeepSemaphore LLC</a>, <a href="https://plus.google.com/103652369558830540272/about" target="_blank">Google+ profile</a></div>

<br>