Difference between revisions of "ViewportPosition"
From Headbone Creative
(Initial page, includes API information and categories) |
Latest revision as of 04:07, 21 April 2013
This script will reposition the object to the specified position in the viewport when the level starts.
Contents |
[edit] Public Variables
[edit] viewportPosition : Vector2
This is the relative position on the camera's view where the object will be positioned.
[edit] depth : float
This is how far back from the camera the object will be positioned.
[edit] autoDepth : bool
If this is set to true, the depth will be set to the local Z position of the current object.
[edit] viewCamera : Camera
This is the camera to use. If not set, this script will use the camera at the top of the object hierarchy or the main camera.
[edit] Public Functions
[edit] void UpdatePosition ()
This will update the position of the object on the screen relative to the view camera selected.