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.

This page is generated from the comments in src/webgl/p5.Camera.js . Please feel free to edit it and submit a pull request!

Related References