But if you call if outside the first 256x256 it RETURNS THE WRONG VALUE. It appears to return the ground level from the NW corner of the SW sub-region, but I have a lot of flat water in my SW sub-region, so I can't be sure which wrong value it is returning.
Now I wish I had not used CAPITAL LETTERS to report llEdgeOfWorld not working, because that is an annoyance. But llGround not working in mega regions is A DISASTER FOR MY SCRIPTS!
I use llGround to tell when sailboats run aground, when kayaks leave the confines of a river, where to grow trees, where to place brush particles. I have to tell my Kitely customers, SORRY NOTHING WORKS IN MEGAS for now.
Here is a script to demonstrate the problem, although you have to test it on a mega that has different terrain in each sub-region. Put this script in a prim. Drag the prim around your SW sub-region, it reports the ground and slope correctly. Move it into any other sub-region, it stops working correctly. For example place the prim centered on the ground, the llGround values should be about the same as the position Z value, but it will not match (if your terrain is at all interesting).
Code: Select all
default //demonstrate llGround failing in mega regions
{
state_entry()
{
llSetTimerEvent(1);
}
timer()
{
vector pos=llGetPos();
llSetText("pos="+(string)pos
+"\nground="+(string)llGround(ZERO_VECTOR)+
"\nnormal="+(string)llGroundNormal(ZERO_VECTOR)
,<0,1,0>,1.0);
}
}