This command sets the position and angle of a 3D object.
object.Set(x,y,z,anglex,angley,anglez,time)
x , y , and z | The object s position on the x, y, and z coordinate system |
anglex , angley , and anglez | Refer to the position of the object relative to the x, y, or z axes in radians. |
t ime | The number of seconds the command requires. |
Alternately, we can make the position of the object the same as another 3D object, as shown here:
object.Set(other3DObject, time)
oworld = New World(); ocamera = New Camera(oworld); obrick = oworld.CreateBrick(50,50,50); ocamera.MoveBack(1200); // Set the position of the brick. It will be moved // and rotated about all three axes in 5 seconds. Obrick.Set(50,50,30,1,0.5,0.25,5); //lLop While(TRUE) { //Roll left when the left arrow key is pressed. If(IsKeyDown(Keyboard.LEFT)) { obrick.RollLeft(1,1); } // Roll right when the right arrow key is pressed. If(IsKeyDown(Keyboard.RIGHT)) { Obrick.RollRight(1,1); } }