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

Example

function onScriptLoad()
{
	WorldPosToScreen( player.Pos );
}

This sample was generated from the signature – adapt the values to your gamemode.

Section: Screen, world and camera

Categories: Client functions | Screen, world and camera