CAM_MOVE

CAM_MOVE N,D

MOVES THE CAMERA BY THE DISTANCE D IN ITS POINTING DIRECTION

  • Type: Command
  • Parameter: 1
  • Group: 3D Objects

ACTION

The command CAM_MOVE N,D moves the distance D forward or back the camera in its pointing direction.

The camera moves forward if D is positive.

The camera moves back if D is negative.

Recall: at creation, the pointing direction of the camera is the vector (0,0,1). The pointing direction is changed by the rotation commands on the camera: CAM_ROLL, CAM_PITCH and CAM_TURN and by the pointing at a 3D object command: POINT_OBJECT.

SYNTAX: CAM_MOVE D

  • D = distance value (integer or real).

USE

  • The command CAM_MOVE is used to move the camera.

ERROR

  • If D is not a correct expression.
  • If no SCENE3D is created.

EXAMPLE

rem create a 3D world

scene3d 1

rem create a cube

3d_cube 1,1

rem move camera forward

cam_move 1,5

rem put camera at its place

cam_move 1,-5

SEE ALSO

CAM_PITCH

CAM_ROLL

CAM_TURN

POINT_OBJECT