ScreenToWorldCoordinates (Harvest)

From OxeyeWiki

Revision as of 16:14, 2 December 2009 by 166 MMX (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

worldX, worldY = screenToWorldCoordinates(screenX, screenY)

Converts screen coordinates to world coordinates.

Parameter Expected Type Description
screenX Number The x coordinate of a point on the current screen.
screenY Number The y coordinate of a point on the current screen.
Returns

Returns two values, worldX and worldY. Both are of the type Number.

Harvest Library

Example

local x,y = harvest.screenToWorldCoordinates(mouseX, mouseY)
harvest.spawnChargeBomb(x, y)

Resources

Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox