Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0007374opensim[REGION] Script Functionspublic2014-11-16 15:162015-04-29 09:25
ReporterKayaker Magic 
Assigned To 
PlatformWindows .NETOSOpenSimOS Version0.8.0.1 post_fix
Product Version 
Target VersionFixed in Version 
Summary0007374: llCastRay does not return the UUID of child prims
DescriptionWhen pointing llCastRay at a compound object, it is supposed to return the ID of the prim hit. In Second Life this will be the UUID of the child prim hit.

But in OpenSimulator, the UUID returned is always that of the root prim of the object, not the UUID of the child prim that the cast ray intersected.
Steps To ReproducePut the following script in a prim, wear the prim, go into mouse-look mode, point the cursor at various parts of an object and click the left-mouse button.

On each click the script reports the name of the object cast-ray hit. This name is always the name of the root prim, even when you are casting a child prim object.
Additional Information        //llCastRay Test
        if (llGetAttached()!=0) //if we are not already attached
            llRequestPermissions(llGetOwner(),PERMISSION_TAKE_CONTROLS | PERMISSION_TRACK_CAMERA);

        on_rez(integer param)
        attach(key id)
            if (id != NULL_KEY)
        run_time_permissions(integer perm)
            if(PERMISSION_TAKE_CONTROLS & perm)
                llTakeControls(CONTROL_ML_LBUTTON, TRUE, FALSE);
        } //run_time_permissions

        control(key avatar, integer levels, integer edges)
            if ((levels & CONTROL_ML_LBUTTON) && (edges & CONTROL_ML_LBUTTON))
                rotation rot=llGetCameraRot(); //in mouselook, use direction you are looking!
                vector start=llGetPos()+<0.5,0,0.8>*rot; //start at avatar head level
                vector end = start+<256.0,0,0>*rot; //continue for 256 meters in that direction
                list hit = llCastRay(start,end,[RC_DETECT_PHANTOM,FALSE]); //detect anything on that line
                if (llList2Integer(hit,-1)>0) //if there was a hit
                    key id=llList2Key(hit,0);
                    vector pos=llList2Vector(hit,1); //get the co-ord
     // llRezObject("dot",pos,ZERO_VECTOR,ZERO_ROTATION,1); //put a temp prim there
                    if (id==NULL_KEY)


TagsNo tags attached.
Git Revision or version number
Run Mode Grid (Multiple Regions per Sim)
Physics EngineODE
Environment.NET / Windows64
Mono VersionNone
Attached Files

- Relationships
duplicate of 0006623new llCastRay returns incorrect UUID when it collides with a linkset 
related to 0007546closednebadon llCastRay only partly implemented 

-  Notes
There are no notes attached to this issue.

- Issue History
Date Modified Username Field Change
2014-11-16 15:16 Kayaker Magic New Issue
2014-11-19 06:39 dz Relationship added duplicate of 0006623
2015-04-29 09:25 Magnuz Relationship added related to 0007546

Copyright © 2000 - 2012 MantisBT Group
Powered by Mantis Bugtracker