ScreenToWorldCoordinates (Harvest)
From OxeyeWiki
(Difference between revisions)
(Created page with '{{HarvestMethod | worldX, worldY = screenToWorldCoordinates(screenX, screenY) | Converts screen coordinates to world coordinates. | {{MethodParam|screenX|Number|The x coordinate ...') |
|||
Line 4: | Line 4: | ||
| | | | ||
Converts screen coordinates to world coordinates. | Converts screen coordinates to world coordinates. | ||
- | |||
{{MethodParam|screenX|Number|The x coordinate of the current screen}} | {{MethodParam|screenX|Number|The x coordinate of the current screen}} | ||
{{MethodParam|screenY|Number|The y coordinate of the current screen}} | {{MethodParam|screenY|Number|The y coordinate of the current screen}} |
Revision as of 22:38, 1 December 2009
Converts screen coordinates to world coordinates. | screenX | Number | The x coordinate of the current screen | ||
screenY | Number | The y coordinate of the current screen | |||
Returns to values, worldX and worldY. Both are of the type Number. | |||||
Parameter | Expected Type | Description | |||
Returns | |||||
{{{4}}} |
Example
local x,y = harvest.screenToWorldCoordinates(mouseX, mouseY) harvest.spawnChargeBomb(x, y)