Advertisement
Guest User

Untitled

a guest
Sep 24th, 2017
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. vector groundVector = llGround(ZERO_VECTOR); // ZERO_VECTOR because I want to find the ground vector directly under me
  2.  
  3. float groundHeight = groundVector.z; // Now get the height part of that vector
  4.  
  5. vector myPos = llGetPos(); // Next, find my own position...
  6.  
  7. float myHeight = myPos.z; // ... and find the height part of that
  8.  
  9. float myHeightAboveGround = myHeight - groundHeight; // The difference between the two, is how high I am above the ground
  10.  
  11. if (myHeightAboveGround > 1.0)
  12. {
  13.   llSetPos(llGetPos() - <0,0,1.1>);
  14. }
  15. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement