Convert screen coordinates||doc135641

September 20, 2022

Format

 Blockman:getScreenPos(position) 
  • The class to which the function belongs:Blockman

Description

Convert world coordinates to screen coordinates.


Parameters

Variable name type Description
position Vector3 world position

Value Returned

type Description
table Returns the position of the screen coordinate axes x, y, z, and the distance between the model and the camera position after the space is transformed


Code Samples

local result = Blockman.Instance():getScreenPos({x=0,y=3,z=0})
print(result.x)
print(result.y)
print(result.z)
--c is the distance between the converted model and the camera
print(result.c)