Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- vector groundVector = llGround(ZERO_VECTOR); // ZERO_VECTOR because I want to find the ground vector directly under me
- float groundHeight = groundVector.z; // Now get the height part of that vector
- vector myPos = llGetPos(); // Next, find my own position...
- float myHeight = myPos.z; // ... and find the height part of that
- float myHeightAboveGround = myHeight - groundHeight; // The difference between the two, is how high I am above the ground
- if (myHeightAboveGround > 1.0)
- {
- llSetPos(llGetPos() - <0,0,1.1>);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement