WorldToScreenCoordinates (Harvest)

From OxeyeWiki

(Difference between revisions)
Jump to: navigation, search
166 MMX (Talk | contribs)
(Created page with '{{HarvestMethod | screenX, screenY = worldToScreenCoordinates(worldX, worldY) | Converts world coordinates to screen coordinates. | {{MethodParam|worldX|Number|The x coordin...')
Newer edit →

Revision as of 22:51, 1 December 2009

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)
Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox