Reference tilt()

tilt()

Rotates the camera up and down.

Tilting rotates the camera without changing its position. The rotation happens in the camera’s "local" space.

The parameter, angle, is the angle the camera should rotate. Passing a positive angle, as in myCamera.tilt(0.001), rotates the camera down. Passing a negative angle, as in myCamera.tilt(-0.001), rotates the camera up.

Note: Angles are interpreted based on the current angleMode().

Examples

Syntax

tilt(angle)

Parameters

angle
Number:

amount to rotate in the current angleMode().

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