Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0007351opensim[REGION] Script Functionspublic2014-10-12 09:332015-04-29 09:25
ReporterKayaker Magic 
Assigned To 
PrioritynormalSeverityminorReproducibilityalways
StatusnewResolutionopen 
Platformany 0.8 Pot_FixesOS0.8OS Version0.8
Product Version 
Target VersionFixed in Version 
Summary0007351: llCastRay returns hits incorrectly outside rotated objects
DescriptionllCastRay 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.
Steps To ReproduceWear 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.
Additional Informationdefault
{
    state_entry()
    {
        llSetTimerEvent(1.0);
    }
    timer()
    {
        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)
                llSetText("ground",<1,1,0>,1.0);
            else
                llSetText(llKey2Name(id),<0,1,0>,1.0);
        }
        else
            llSetText("nothing",<1,0,0>,1.0);
    }
}
TagsNo tags attached.
Git Revision or version number
Run Mode Grid (Multiple Regions per Sim)
Physics EngineBulletSim
Environment.NET / Windows64
Mono VersionOther
ViewerFireStorm
Attached Files

- Relationships
related to 0007546closednebadon llCastRay only partly implemented 

-  Notes
There are no notes attached to this issue.

- Issue History
Date Modified Username Field Change
2014-10-12 09:33 Kayaker Magic New Issue
2015-04-29 09:25 Magnuz Relationship added related to 0007546


Copyright © 2000 - 2012 MantisBT Group
Powered by Mantis Bugtracker