WorldToScreenCoordinates (Harvest)
From OxeyeWiki
screenX, screenY = worldToScreenCoordinates(worldX, worldY) | ||
Converts world coordinates to screen coordinates. | ||
Parameter | Expected Type | Description |
worldX | Number | The x coordinate of a point on the world. |
worldY | Number | The y coordinate of a point on the world. |
Returns | ||
Returns two values, screenX and screenY. Both are of the type Number. |
Example
local x,y = harvest.worldToScreenCoordinates(buildingX, buildingY) harvest.drawText("I'm here", x, y - 15, 1)