Scripting/Client/Functions/GetGroundZLevelForPosLoad
v0.4-beta+: like GetGroundZLevelForPos, but when the place is not streamed in (far away, another island) it is loaded first, so the real ground height comes back. A short hitch: use it right before a teleport, not every frame.
Syntax
GetGroundZLevelForPosLoad(x, y, z)Arguments
- float x
- float y
- float z
Returns
float
Example
function onScriptLoad()
{
local pos = player.Pos;
local result = GetGroundZLevelForPosLoad( pos.x, pos.y, pos.z );
MessagePlayer( "GetGroundZLevelForPosLoad returned: " + result, player );
}This sample was generated from the signature – adapt the values to your gamemode.
Related pages
- GetScreenWidth
- WorldPosToScreen
- ScreenPosToWorld
- GetGroundZLevel
- GetGroundZLevelForPos
- Draw3DText
- Draw3DSprite
- Draw3DTextWorld
- Draw3DSpriteWorld
- SetCameraMatrix
- SetCameraTarget
- RestoreCamera
Section: Screen, world and camera
Categories: Client functions | Screen, world and camera