- Processing
- p5.js
- Processing.py
- Processing for Android
- Processing for Pi

- Processing Foundation

This reference is for Processing 3.0+. If you have a previous version, use the reference included with your software in the Help menu. If you see any errors or have suggestions, please let us know. If you prefer a more technical reference, visit the Processing Core Javadoc and Libraries Javadoc.

Name | ### beginCamera()
Examples |
    size(100, 100, P3D);
    noFill();

    beginCamera();
    camera();
    rotateX(-PI/6);
    endCamera();

    translate(50, 50, 0);
    rotateY(PI/3);
    box(45);
Description | The beginCamera() and endCamera() functions enable advanced customization of the camera space. The functions are useful if you want to more control over camera movement, however for most users, the camera() function will be sufficient. The camera functions will replace any transformations (such as rotate() or translate()) that occur before them in draw(), but they will not automatically replace the camera transform itself. For this reason, camera functions should be placed at the beginning of draw() (so that transformations happen afterwards), and the camera() function can be used after beginCamera() if you want to reset the camera before applying transformations. This function sets the matrix mode to the camera matrix so calls such as translate(), rotate(), applyMatrix() and resetMatrix() affect the camera. beginCamera() should always be used with a following endCamera() and pairs of beginCamera() and endCamera() cannot be nested.
Syntax |
    beginCamera()
Returns | void
Related | camera() endCamera() applyMatrix() resetMatrix() translate() scale()

Updated on January 1, 2021 03:38:08am EST
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.