3D_POSITION

3D_POSITION N,X,Y,Z

SET THE POSITION IN (X,Y,Z) OF THE 3D OBJECT NUMBER N

  • Type: Command
  • Parameters: 4
  • Group: 3D Objects

ACTION

The command set the position of the 3D object designated by its number N, and places it in position (X,Y,Z).

SYNTAX: 3D_POSITION N,X,Y,Z

  • N = 3D object number (integer or real). Must be greater than 0 and less than or equal to the maximum of allowed 3D object number.
  • X = new position on X axis.
  • Y = new position on Y axis.
  • Z = new position on Z axis.

USE

  • The command 3D_POSITION is used to move a 3D object.

ERROR

  • If number N is not a correct expression.
  • If number N exceeds the maximum of allowed 3D object number.
  • If number N is not greater than 0.
  • If 3D object number N does not exist.
  • If X or Y or Z is not a correct expression.

EXAMPLE

rem create a 3D world

scene3d 1

rem resize the 3D world

width 1,300:height 1,300

rem place the camera

cam_position 5,10,10

rem create sphere at (0,0,0)

3d_sphere 1,2

rem wait for 1 second

wait 1000

rem move it to (5,0,0)

3d_position 1,5,0,0

SEE ALSO

3D_X_POSITION

3D_Y_POSITION

3D_Z_POSITION