Scripting/Client/Functions/WorldPosToScreen
Returns {x, y, z} where x/y are screen pixels and z is a scale factor (handy for sizing labels by distance), or null if the point is behind the camera. position is a Vector or {x,y,z} table.
Syntax
WorldPosToScreen(position)Arguments
- Vector position –
positionis aVectoror{x,y,z}table.
Example
function onScriptLoad()
{
WorldPosToScreen( player.Pos );
}This sample was generated from the signature – adapt the values to your gamemode.
Related pages
- GetScreenWidth
- ScreenPosToWorld
- GetGroundZLevel
- GetGroundZLevelForPos
- GetGroundZLevelForPosLoad
- Draw3DText
- Draw3DSprite
- Draw3DTextWorld
- Draw3DSpriteWorld
- SetCameraMatrix
- SetCameraTarget
- RestoreCamera
Section: Screen, world and camera
Categories: Client functions | Screen, world and camera