Altimeter/Speedometer

From libopenmetaverse - libomv - Developer Wiki

Jump to: navigation, search

This script shows an avatar or objects altitude in meters and speed in meters per second.

default 
{
    state_entry() 
    {
        llSetTimerEvent(0.1);
    }
    timer() 
    {
        vector pos = llGetPos();
        llSetText("Altitude: " + (string)llRound(pos.z) + "m\nSpeed: " + 
        (string)llRound(llVecMag(llGetVel())) + "m/s",<1,1,1>,1);
    }
}