Reference setPosition()

setPosition()

Sets the camera’s position in "world" space without changing its orientation.

The parameters, x, y, and z, are the coordinates where the camera should be placed. For example, calling myCamera.setPosition(10, 20, 30) places the camera at coordinates (10, 20, 30) in "world" space.

Examples

Syntax

setPosition(x, y, z)

Parameters

x
Number: x-coordinate in "world" space.
y
Number: y-coordinate in "world" space.
z
Number: z-coordinate in "world" space.

Related References