What does argument 'up' mean in CameraController.lookAt()?


In 3D space, 'eye' and 'target' can define position and direction of a camera. But what is 'up' mean?


Up means the top of the screen. The camera is allowed to roll.

I realize this is an old thread, and that in b27 - 2014-04-01: *All CameraController functions have been moved up to the Camera. Removed CameraController. *However, I assume that CameraController.lookAt operated the same as Camera.lookAt.

Looking at the code it seems that the ‘supplied up vector’ is used in conjunction with the direction vector to define a plane, of which right is the normal of. It doesn’t matter if the ‘supplied up vector’ is perpendicular to direction. (up vector is CCW from direction vector when looking from the right vector.) Then the ‘actual up vector’ is perpendicular to both direction and right. (direction vector is CCW from right vector when looking from the up vector.)

So in affect by supplying an ‘up vector’ what you’re actually doing is dictating the direction of the right vector. Of course the ‘actual up vector’ will be somewhere in the plane defined by direction and the ‘supplied up vector.’

Apparently the eye,target,up parameters are going to be deprecated in 1.6, so I suppose this doesn’t matter anymore.