llGroundRepel
llGroundRepel(float height,// Target distance in meters above the ground or water.integer water,// Boolean. IfTRUE, damp relative to the higher of land and water; ifFALSE, damp relative to land only.float tau// Timescale in seconds to critically damp the movement.
);- Energy
- 10
Critically damps the object's vertical motion to height (using critical damping timescale tau) if it is within height * 0.5 of the terrain (or water level if water is TRUE). Only works on physics-enabled objects; do not use with vehicles.
Critically damps to height if within height * 0.5 of ground or water level (which ever is higher).
Do not use with vehicles.
llGroundRepel(0.0, 0, 0.0);Specification
Section titled “Specification”Does not pull the object down if it is stuck higher than that, unlike the similar llSetHoverHeight.
To stop llGroundRepel, this seems to work: llGroundRepel(0.0, FALSE, 0.0)
Caveats
Section titled “Caveats”- This is not a prim property; stopping or resetting the script stops
llGroundRepel; same with the similarllSetHoverHeight - Crossing a sim border will cancel
llGroundRepel, unlikellSetHoverHeight - A negative height value allows you to hover underwater, same as
llSetHoverHeight - A previous version of this page suggested that
llStopHoverwill stopllGroundRepel, but it does not
Examples
Section titled “Examples”Example 1
default{ state_entry() { llSetStatus(STATUS_PHYSICS, TRUE); llGroundRepel(0.5, TRUE, 0.2); // In a 1/2 meter cube this is roughly the minimum height for any noticeable effect. // to llGroundRepel(4096.0, TRUE, 0.2); // There is no restrictive maximum. // However as the prim reaches 4096 meters (bear in mind the prim height will be (float height + ground height)) // it will be too high to be allowed to exist. }}// This is actually a remarkably fast way to go straight up!!See also
Section titled “See also”Functions
Section titled “Functions”llSetHoverHeight— Similar tollGroundRepel, but also pulls down
Original wiki source
Some wiki templates and tables need their original context. View this article on the Second Life Wiki. Technical wording and examples are retained from the source; historical guidance may differ from current behavior.