llSetHoverHeight/ja

From Second Life Wiki
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

Summary

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

tau 秒内に地面 (もしくは水面) の上 height に限界減衰で到達します。

• float height 地面との距離
• integer water 真偽値。 TRUE の場合、水面上も浮きます。
• float tau 臨界減衰までにかける秒数

乗り物で使用しないでください。
浮遊状態を止めるには llStopHover を使用します。

Caveats

  • 物理 オブジェクトのみで動作します。
  • 組み込まれている制限をあてにしないでください。過去には、オブジェクトの最初の位置と浮遊高度の間の差が 64 メートルに制限されていました。SL サーバ 1.26.2 では制限は地表から 4096 メートルとなっています。
All Issues ~ Search JIRA for related Bugs

Examples

// 装着したプリムを入れてタッチすると、飛ばずに空中に浮かびだします。
// もう一度タッチすると、地面に落ちます。

integer gHovering = FALSE; // 現在飛んでいる状態ですか?

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...");

            // 現在の位置から 5 メートル上を浮遊しだします
            vector myPosition = llGetPos();
            llSetHoverHeight(myPosition.z - llGround(ZERO_VECTOR) + 5.0, FALSE, 1.0);
        }

        gHovering = !gHovering; // スイッチを反転させます
    }
}

See Also

Functions

•  llGroundRepel llSetHoverHeight と同じですが、常に浮くわけではありません
•  llStopHover 浮遊を停止します

Deep Notes

Search JIRA for related Issues

Signature

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