SetViewPosition (Harvest)
From OxeyeWiki
(Difference between revisions)
(Created page with '{{HarvestMethod | setViewPosition(x, y) | Sets the world view position. The position will be clamped to the currently visible world rectangle. | {{MethodParam|x|Number|The world ...') |
|||
Line 15: | Line 15: | ||
harvest.getViewPosition(objectX - w * .5, objectY - h * .5) | harvest.getViewPosition(objectX - w * .5, objectY - h * .5) | ||
</pre> | </pre> | ||
+ | |||
+ | === Resources === | ||
+ | *[http://www.oxeyegames.com/forum/viewtopic.php?p=1523#p1523 Oxeye Game Studio Forum - Harvest Functions] |
Latest revision as of 16:15, 2 December 2009
setViewPosition(x, y) | ||
Sets the world view position. The position will be clamped to the currently visible world rectangle. | ||
Parameter | Expected Type | Description |
x | Number | The world x coordinate. |
y | Number | The world y coordinate. |
Returns | ||
Returns nothing. |
Example
local w,h = harvest.getScreenSize() harvest.getViewPosition(objectX - w * .5, objectY - h * .5)