WorldToScreenCoordinates (Harvest)

From OxeyeWiki

Jump to: navigation, search

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.

Harvest Library

Example

local x,y = harvest.worldToScreenCoordinates(buildingX, buildingY)
harvest.drawText("I'm here", x, y - 15, 1)

Resources

Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox