WorldToScreenCoordinates (Harvest)

From OxeyeWiki

Revision as of 22:51, 1 December 2009 by 166 MMX (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
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)
Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox