Difference between revisions of "LlGroundRepel"

From Second Life Wiki
Jump to navigation Jump to search
m (<lsl> tag to <source>)
(11 intermediate revisions by 4 users not shown)
Line 1: Line 1:
{{LSL_Function
|inject-2={{LSL_Function/physical}}
{{LSL_Function/damping|tau}}
{{LSL_Function/damping|tau}}
{{LSL_Function
|func=llGroundRepel
|func_id=230|func_sleep=0.0|func_energy=10.0
|func_id=230|func_sleep=0.0|func_energy=10.0
|func=llGroundRepel
|p1_type=float|p1_name=height|p1_desc=Distance above the ground
|p1_type=float|p1_name=height|p1_desc=Distance above the ground
|p2_type=integer|p2_name=water|p2_desc=boolean, if [[TRUE]] then hover above water too.
|p2_type=integer|p2_name=water|p2_desc=boolean, if [[TRUE]] then hover above water too.
|p3_type=float|p3_name=tau
|p3_type=float|p3_name=tau
|func_footnote=Do not use with vehicles.
|func_footnote=Do not use with vehicles.
|func_desc=Critically damps to '''height''' if within '''height'''*0.5 of level
|func_desc=Critically damps to {{LSLP|height}} if within <code>{{LSLPT|height}} * 0.5</code> of ground or water level (which ever is higher)
|return_text
|return_text
|spec
|spec
|caveats
|caveats
|constants
|constants
|examples
|examples=<source lang="lsl2">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!!</source>
|helpers
|helpers
|also_functions={{{!}}
|also_functions={{LSL DefineRow||[[llSetHoverHeight]]| Same as llGroundRepel but without the height condition}}
{{LSL DefineRow||[[llSetHoverHeight]]| Same as llGroundRepel but without the height condition}}
{{LSL DefineRow||[[llStopHover]]|To stop hovering}}
{{!}}}
|also_tests
|also_tests
|also_events
|also_events

Revision as of 11:24, 22 January 2015

Summary

Function: llGroundRepel( float height, integer water, float tau );

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

• float height Distance above the ground
• integer water boolean, if TRUE then hover above water too.
• float tau seconds to critically damp in

Do not use with vehicles.

Caveats

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

•  llSetHoverHeight Same as llGroundRepel but without the height condition
•  llStopHover To stop hovering

Deep Notes

Search JIRA for related Issues

Signature

function void llGroundRepel( float height, integer water, float tau );