Skip to content
lsl.devlsl.devLSL Dev

LlGroundRepel

Looking for the current API? Open the llGroundRepel reference →

Wiki description

Critically damps to height if within height * 0.5 of ground or water level (which ever is higher).

Function notes

Do not use with vehicles.

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

  • This is not a prim property; stopping or resetting the script stops llGroundRepel; same with the similar llSetHoverHeight
  • Crossing a sim border will cancel llGroundRepel, unlike llSetHoverHeight
  • A negative height value allows you to hover underwater, same as llSetHoverHeight
  • A previous version of this page suggested that llStopHover will stop llGroundRepel, but it does not

Examples

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: functions

Shared wiki helpers

The original page also injects shared parameter notes, caveats or issue information through these helpers. Their conditional MediaWiki logic is not reproduced here; inspect the preserved helper source for additional material.

Template:LSL Function/physical

Original shared helper source (conditional wiki logic is not evaluated)
{{LSL Injection Test}}{{#if:

{{#vardefine:caveats|{{#var:caveats}}
*Only works in {{#if:{{{avatar|}}}|attachments and}} [[STATUS_PHYSICS|physics-enabled]] objects.}}

}}<noinclude>
{| {{Prettytable}}
|- {{Hl2}}
! #var
! value
|-
{{VarPair|caveats}}
|}
</noinclude>

Template:LSL Function/damping

Original shared helper source (conditional wiki logic is not evaluated)
{{LSL Injection Test}}{{#if:

{{#vardefine:header_footnote|{{#var:header_footnote}}}}

{{#vardefine:p_{{{1|}}}_desc|seconds to critically damp in}}

{{#if:{{{1|}}}|{{#vardefine:hidden-text|{{#var:hidden-text}}{{LSLC|Damping}}}}}}

}}<includeonly>{{#if:{{{1|}}}|{{LSLC|Damping}}}}</includeonly><noinclude>
{| {{Prettytable}}
|-{{Hl2}}
! #var
! value
|-
{{VarPair|p_{{{1|}}}_desc}}
|-
{{VarPair|p_{{{1|}}}_hover}}
|-
{{VarPair|header_footnote}}
|}
</noinclude>
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.