参考 lookAt()

lookAt()

Points the camera at a location.

myCamera.lookAt() changes the camera’s orientation without changing its position.

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

示例

语法

lookAt(x, y, z)

参数

x
Number:

x-coordinate of the position where the camera should look in "world" space.

y
Number:

y-coordinate of the position where the camera should look in "world" space.

z
Number:

z-coordinate of the position where the camera should look 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!

相关参考