Critically damps to a height above the ground (or water) in tau seconds.

Syntax

void llSetHoverHeight( float height, integer water, float tau );

Forced delay: 0.0 seconds. Energy: 10.0.

Parameters

float height
Distance to hover above the ground (if negative, hovers below ground)
integer water (boolean)
boolean, if TRUE then hover above water too (or below if height is negative), if FALSE ignore water like it isn't there
float tau
seconds to critically damp in

Do not use with vehicles.
Use llStopHover to stop hovering.

Caveats

Examples

// Put in an attached prim and touch to start floating in air without flying.
// Touch again to drop to the ground.

integer gHovering = FALSE; // are we supposd to be hovering now?

default {
    touch_start(integer total_number) {
        if (!llGetAttached()) {
            llWhisper(0, "Wear me to play.");
            return;
        }

        if (gHovering) {
            llOwnerSay("Releasing you.");
            llStopHover();
        }
        else {
            llOwnerSay("Making you float...");

            // Start hovering 5 meters over our current location.
            vector myPosition = llGetPos();
            llSetHoverHeight(myPosition.z - llGround(ZERO_VECTOR) + 5.0, FALSE, 1.0);
        }

        gHovering = !gHovering; // flip the switch
    }
}

Notes

See also

Functions