• 93阅读
  • 0回复

llStopHover [复制链接]

上一主题 下一主题
离线gaopeng
 

只看楼主 倒序阅读 楼主  发表于: 04-16
序号
类别
函数及事件
功能
注意事项
358

l Math
Functions

llStopHover( )

1.让hover的物体停止飞行


例子
1

// Put in anattached prim and touch to start floating in air without flying.
// Touch again todrop 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 toplay.");
            return;
        }

        if (gHovering) {
            llOwnerSay("Releasingyou.");
            llStopHover();
        }
        else {
            llOwnerSay("Making youfloat...");

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

        gHovering = !gHovering; // flip theswitch
    }
}

快速回复
限100 字节
如果您提交过一次失败了,可以用”恢复数据”来恢复帖子内容
 
上一个 下一个