SetViewPosition (Harvest)

From OxeyeWiki

(Difference between revisions)
Jump to: navigation, search
166 MMX (Talk | contribs)
(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 ...')
Newer edit →

Revision as of 23:02, 1 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.

Harvest Library

Example

local w,h = harvest.getScreenSize()
harvest.getViewPosition(objectX - w * .5, objectY - h * .5)
Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox