MantisBT - opensim
View Issue Details
0007351opensim[REGION] Script Functionspublic2014-10-12 09:332015-04-29 09:25
Kayaker Magic 
any 0.8 Pot_Fixes0.80.8
Grid (Multiple Regions per Sim)
.NET / Windows64
0007351: llCastRay returns hits incorrectly outside rotated objects
llCastRay reports hits on nearby objects when it should not. It seems to report a hit when the ray passes through a XY aligned bounding box that encloses the hit object. So objects rotated 45 degrees have large bounding boxes that return false positives.
Wear a small prim on your HUD center, put the following script in it. This reports the name of the nearest object below your avatar.
Create a block that is long and thin, 2x10x0.5 meters. Push it partway into the ground so you can walk over it and watch the HUD display change from ground to primitive.

Rotate the long thing primitive 45 degrees around z. Now when you walk around the primitive, the HUD will display the prim name when you are far away from the prim.
        list hits=llCastRay(llGetPos()-<0,0,.5>,llGetPos()-<0,0,5.5>,[]);
        if (llList2Integer(hits,-1)>0) //if cast ray fonund something
            key id=llList2Key(hits,0); //get the first one
            if (id==NULL_KEY)
No tags attached.
related to 0007546closed nebadon llCastRay only partly implemented 
Issue History
2014-10-12 09:33Kayaker MagicNew Issue
2015-04-29 09:25MagnuzRelationship addedrelated to 0007546

There are no notes attached to this issue.