# Celestia/Celx Scripting/CELX Lua Methods/CEL command setposition
### setposition

setposition { base <basevector> offset <offsetvector> }
-- OR --
setposition { x <xbase64> y <ybase64> z <zbase64> }
Moves the camera to a specific position in the 3-dimensional universe. If you are attempting to duplicate a position based on a Bookmark or Cel://URL, you will also need to set the proper Coordinate System, orientation, and other parameters. (Also see seturl).
Arguments:

#### base <basevector>

    Base vector [ <xnumber> <ynumber> <znumber> ]. No default. This value may be obtained from a Celestia Bookmark, which is stored in the favorites.cel file located in the Celestia directory.
   * The 1st value <xnumber> represents the camera location, along the X axis in light-years.
   * The 2nd value <ynumber> represents the camera location, along the Y axis in light-years.
   * The 3rd value <znumber> represents the camera location, along the Z axis in light-years.

#### offset <offsetvector>

    Offset value. No default. This value may be obtained from a Celestia Bookmark, which is stored in the favorites.cel file located in the Celestia directory.
   * The 1st value <xoffsetnum> represents the offset of the camera location, with respect to the Base <basevector> along the X axis in light-years.
   * The 2nd value <yoffsetnum> represents the offset of the camera location, with respect to the Base <basevector> along the Y axis in light-years.
   * The 3rd value <zoffsetnum> represents the offset of the camera location, with respect to the Base <basevector> along the Z axis in light-years.
-- OR --
Arguments:

#### x <xbase64>

    Represent the X-base and X-offset values as stored by a Cel://URL. No default. It is obtained from the following Cel://URL value: ?x=.

#### y <ybase64>

    Represent the Y-base and Y-offset values as stored by a Cel://URL. No default. It is obtained from the following Cel://URL value: &y=.

#### z <zbase64>

    Represent the Z-base and Z-offset values as stored by a Cel://URL. No default. It is obtained from the following Cel://URL value: &z=.
CELX equivalent-1:
Based on parameter list-1 and the celestia:newposition, celestia:newvector, position:addvector and observer:gotolocation methods.
* Create new position object from <xnumber>, <ynumber> and <znumber> and store in "pos". The units of the components of a position object are millionths of a light-year, so you have to convert light-year in a Celestia Bookmark to millionths of a light-year in a CELX position object.
* Create new vector object from <xoffsetnum>, <yoffsetnum> and <zoffsetnum> and store in "vec". The units of the components of a vector object are millionths of a light-year, so you have to convert light-year in a Celestia Bookmark to millionths of a light-year in a CELX vector object.
* Add new position object and new vector object and store in "tarpos".
* Get observer instance of the active view and goto "tarpos" in zero seconds.
Note: In this equivalent, the observer goes to a position releative to the current frame of reference. If the current frame of reference is "universal", the observer:setposition method may also be used instead of the observer:gotolocation method.
Summarized:
CELX equivalent-2:
Based on parameter list-2 and the celestia:newposition(base64) and observer:gotolocation methods.
* Create new position object from URL-style Base64-encoded values and store in "pos". <xbase64>: The X-component of the new vector, as a string-values taken from a cel style URL ?x=. <ybase64>: The Y-component of the new vector, as a string-values taken from a cel style URL &y=. <zbase64>: The Z-component of the new vector, as a string-values taken from a cel style URL &z=.
* Get observer instance of the active view and goto "pos" in zero seconds.
Note: In this equivalent, the observer goes to a position releative to the current frame of reference. If the current frame of reference is "universal", the observer:setposition method may also be used instead of the observer:gotolocation method.
Summarized:
Example-1: Position the camera to a position in space outside of the Milky Way, according parameterlis-1:
CEL:
CELX with the celestia:newposition, celestia:newvector, position:addvector and observer:gotolocation methods, based on parameter list-1:
-- OR -- (If current frame of reference is "universal")
Example-2: Position the camera to the same position in space outside of the Milky Way, according parameterlis-2.
Note: The CelURL values in this example are compatible with Celestia version 1.6.0.
CEL:
CELX with the celestia:newposition(base64) and observer:gotolocation methods, based on parameter list-2:
-- OR -- (If current frame of reference is "universal")
Back to CEL command index