This command increases the x, y, and z coordinates of a 3D object. It changes the position immediately or at a speed that you can specify.
object.AddPosition(x,y,z,time)
x | Number of units to add to the x-axis |
y | Number of units to add to the y-axis |
z | Number of units to add to the z-axis |
time | Number of seconds for the motion to take |
If the time parameter is omitted, the movement occurs immediately.
Alternately, you can say,
object.AddPosition(another3DObject, time),
where another3DObject refers to another object from which to add the coordinate.
The SubPosition command is very similar to this one, but it moves the object in the opposite direction. You do not really need it since using negative numbers in this command will result in the same motion.
oworld = New World(); ocamera = New Camera(oworld); sphere = oworld.CreateSphere(50,50,50,25,25); ocamera.MoveBack(1200); ocamera.Walk(); sphere.AddPosition(100,200,30,5); //move it in 5 seconds //Loop While(TRUE);