MantisBT - opensim
View Issue Details
0006623opensim[REGION] Script Functionspublic2013-05-06 16:022015-04-29 09:25
dz 
 
normalmajoralways
newopen 
master (dev code) 
 
OpenSim 0.7.5 Post_Fixes
Standalone (Multiple Regions)
ODE
Mono / Linux64
2.10
Firestorm
0006623: llCastRay returns incorrect UUID when it collides with a linkset
llCastRay is supposed to return the UUID of the linked prim it intersects.
Instead, it is returning the Root Prim UUID of the linkset. It is ONLY supposed to return the root prim UUID if the (RC_DATA_FLAGS, RC_GET_ROOT_PRIM ) arguments are used. This also means that the link number returned (using RC_DATA_FLAGS, RC_GET_LINK_NUM ) is ALWAYS 1.

create a prim and add the following script.

integer filter= 8;// default is 0
 
default
{
    state_entry()
    {
        string ownerName = llKey2Name(llGetOwner());
        llOwnerSay("Hello, " + ownerName + "!");
    }
 
    touch_start(integer total_number)
    {
        vector start = llGetPos();
        vector end = start - <0.0, 0.0,5.0>;
 
        llOwnerSay("Filter " + (string)filter + " - Casting ray from : " + (string) start + " to " + (string) end);
 
        list results = llCastRay(start, end, [RC_REJECT_TYPES, filter, RC_MAX_HITS, 4] );
        
        llOwnerSay(llList2CSV(results));
 
        integer hitNum = 0;

        while (hitNum < llList2Integer(results, -1))
        {
            // Stride is 2 because we didn't request normals or link numbers
            key uuid = llList2Key(results, 2*hitNum);
 
            string name = "Land"; // if (uuid == NULL_KEY)
 
            if (uuid != NULL_KEY)
                name = llKey2Name(uuid);
 
            llOwnerSay("Hit " + name + "." + llList2String(llGetObjectDetails(uuid,[OBJECT_DESC]),0));
 
            ++hitNum;
        }
 
  
    }
}


Move the prim to eye level...

Create 4 2x2 meter tiles on the group..do not link them.
Move the test prim over the top of each and touch it... It should spam hit information about the prim beneath it. Move the prim over each of the 4 tiles and note that it correctly reports the prim UUID.

Link the 4 tiles and repeat... you will notice that the root UUID is returned no matter which tile the object is above.

No tags attached.
has duplicate 0007374new  llCastRay does not return the UUID of child prims 
related to 0007546closed nebadon llCastRay only partly implemented 
Issue History
2013-05-06 16:02dzNew Issue
2013-05-06 16:09dzGit Revision or version numberD2 release r22458 => OpenSim 0.7.5 Post_Fixes
2014-11-19 06:39dzRelationship addedhas duplicate 0007374
2015-04-29 09:25MagnuzRelationship addedrelated to 0007546

There are no notes attached to this issue.