MantisBT - opensim
View Issue Details
0008732opensim[REGION] Scripting Enginepublic2020-07-17 12:382020-07-18 12:48
Manwa Pastorelli 
 
normalminoralways
newopen 
Linux 64Ubuntu20.04
 
 
Grid (Multiple Regions per Sim)
BulletSim
XEngine
Mono / Linux64
6.x
Firestorm 6.4.5 (60737)
0008732: osForceOtherSit only works at less than 10m
osForceOtherSit(aviUUID, linkKey);

Using this fuction the avatar is not force sat unless they are close to the prim in question. I am not sure when this changed, but last time I used this function (under 0.911) I could force sit an avatar sim wide. (a force sit at 7km would sit an avi at ground level). Currently it doesn't seam to work unless the avi is less than 10m away from the prim.

I have listed the mantis under the Y-Engine but the same behaviour is seen in X-Engine as well.
Using Opensim 0.92

Build a single prim or linkset

Add the script in the additional information.

Click on any links less than 10m from the avi and the avatar will sit as expected. If the distance is greater than 10m the sit silently fails.
default
{
    touch_start(integer num_detected)
    {
        key aviUUID = llDetectedKey(0);
        integer linkNumber = llDetectedLinkNumber(0);
        key linkKey = llGetLinkKey(linkNumber);
        llLinkSitTarget(linkNumber, ZERO_VECTOR , ZERO_ROTATION);
        list details = llGetLinkPrimitiveParams(linkNumber, [ PRIM_POSITION ]);
        vector linkPosition = llList2Vector(details,0);
        vector aviPosition = llDetectedPos(0);
        float distance = llVecDist(aviPosition, linkPosition);
        llOwnerSay("Distance To Touched Link: " + (string)distance);
        osForceOtherSit(aviUUID, linkKey);
    }
}
No tags attached.
Issue History
2020-07-17 12:38Manwa PastorelliNew Issue
2020-07-17 12:47UbitUmarovNote Added: 0036608
2020-07-17 14:51Manwa PastorelliNote Added: 0036609
2020-07-18 00:36UbitUmarovNote Added: 0036610
2020-07-18 00:42UbitUmarovNote Added: 0036611
2020-07-18 12:47Manwa PastorelliNote Added: 0036617

Notes
(0036608)
UbitUmarov   
2020-07-17 12:47   
not sure about that, but check
http://opensimulator.org/wiki/OsSetSitActiveRange [^]
and related methods
(0036609)
Manwa Pastorelli   
2020-07-17 14:51   
Using the range worked BUT only when the sit target is set, having the sit target as a zero vector stopped it working regardless of what the range check said. Less than 10 mins only, should I raise a separate mantis for that?
(0036610)
UbitUmarov   
2020-07-18 00:36   
Ooops, ok
if physics does not do a sit, max distance is currently capped to 10m
that means bullet (only ubOde can do such sits)
(0036611)
UbitUmarov   
2020-07-18 00:42   
so without ubode (or if prim is a phantom/shape type none) you need to provide a sit target.
(0036617)
Manwa Pastorelli   
2020-07-18 12:47   
ok, maybe it would be better to make the default for this to an unlimited range though, that way existing scripts don't break. I just had to go through several sims updating existing scripts (I didn't know they were broken until I tried making something new).