24
 
  Move / Rotate
 

The move command

You can use this command to make move objects, either to create an animation or to have specific function, like a sliding door.

 
A single move....
We learned already how to move an object in the building mode, but you can also add in the action field of the object a move command, which will create a move-animation for this object. The move animation makes the object move in a direction of the 3 axises of the object : X Y ans Z-axis (=horizontally, vertically or forward/backward ), or a combination of these axises. This action moves the object only 1 time 50 meters in 1 direction (and backwards).
model : sf-flyad100.rwx
action : create move 0 0 50
A repeated move....
The action can be repeated constantly by adding "loop" in the action command. Try this out for the X, Y , and Z-axis. Or a combination of the 3 axises, you can choose the distance you want..
model : sf-flyad100.rwx
action : create move 0 0 40 loop
action : create move 0 40 0 loop
action : create move 40 0 0 loop
action : create move 8 8 30 loop
A temporary repeated move ...
"Loop time" will determine the speed of the move : loop time=10 will move the object into 1 direction during 10 seconds. A lower value will make the object move quickly (e.g during 0.5 seconds)
model : sf-flyad100.rwx
action : create move 0 0 50 loop time=10
action : create move 0 30 0 loop time=0.5
Moving after a contact ...
You can also choose the "activate" trigger and make the move after clicking upon the object (a hand will appear when doing a mouseover), or the "bump" trigger after bumping against the object with your avatar.
model : sf-flyad100.rwx
action : activate move 0 0 50 loop time=5
action : bump move 0 30 0 loop time=5
action : activate move 0 -30 0 loop time=5
Making a sliding door...
Now we can make a sliding door or sliding window : By clicking upon the object (= activate command) , the door/window will move away during some seconds and will remain open for a while, so that your avatar can pass through. For this, we add wait= followed by the number of seconds that the door/window remains open. In this example the door/window opens in 2 seconds and remains open during 8 seconds. The move distance is 1 meter (=door width), and the action is only executed 1 time (no loop).
model : pp16w1.rwx
action : activate move 1 0 0 time=2 wait=8
Moving into another direction...
Sometimes , you will notice that the object moves wrongly (moves forward instead of moving to the right). Then you need to rotate first your object with 90 degrees in the building mode. In other cases, you can put the move value on the Z axis instead of the X-axis in your action command, or you need to add a negative value for the move in your action command , so that the object moves into the opposite direction.
model : sf-flyad100.rwx
action : activate move 0 -30 0 loop time=5

The rotate command

You can use this command to rotate objects, either to create an animation or to have specific function, like a rotating door. .

 
Rotating an object....
We learned already how o rotate an object in the building mode, but you can also add in the action field of the object the rotate command, which will create a rotation-animation for this object. The rotation animation makes the object rotate in a direction of the 3 axises of the object : X Y ans Z-axis (=horizontally, vertically or forward/backward ), or a combination of these axises. The value indicates the number of rotations per minute : in this action command the crate will rotate 5 times per minute horizontally around its axis.
model : crate1.rwx
action : create rotate 5
Rotating with 1 , 2 or 3 axises
If you don't specify the axises, then the object rotates horizontally, in the other cases you need to add the x y and z axis in the action command .
model : crate1.rwx
action : create rotate 8 0 0
action : create rotate 0 8 0 (= horizontally)
action : create rotate 0 0 8
action : create rotate 3 3 3 (= combination of 3 axises)
Rotation properties of an object

The rotation is different for every object : this is because the rotation point has of the object has been modeled that way : normally the rotation point should be in the middle of the object, so that the object rotates perfectly in the 3 directions of its axises. But for most objects (also for the crate) the rotation point is located at the bottom of the object. You can see in the building mode (=right-clicking), where you can see that the x- y- and z-axis come together at the bottom side of the object.

model : crate1.rwx
model : unit01.rwx
action : create rotate 3 3 3
There are also models , where the rotation point has been modified in the modeling program for functional reasons, like for instance : for doors , the rotation point needs to be at the edge of the door.
model : fw-dorext1
action : create rotate 5
There are even models with the rotation point outside the object, so that the object rotates in a circle.
model : fish1
action : create rotate 1
Rotation for a traditional door

First you need to find a door-model : these objects have their rotation point at the right of left side. Now we add the activate command.

model : fw-dorext1
action : activate rotate 0 5 0
We see that the door keeps rotating ; now we add a rotation time and also the wait-time. The wait-time is the time that the door needs to stay open in order to walk with your avatar through the door entrance , before the door closes again.
model : fw-dorext1
action : activate rotate 0 5 0 time=3 wait=9
Sometimes the door opens at the wrong hinge-point , then you need to rotate the model in the building mode. And sometimes the door opens into the wrong direction (outside instead of inside) , then add a "negative value" in the action command. You can also add "global" to the command, so that you can see other citizens opening the door , otherwise you would see them walk through the door without opening, as if they have used the Shift-key.
model : fw-dorext1
action : activate rotate 0 -5 0 time=3 wait=9 global
Making a rotating door...

First you need to have the right components for a rotating door. It's obvious that you won't find a model in the standard object path, so we use the standard model pieces. We start with the curved glass pieces around the rotating door:

model : pp16crv1
action : create scale 0.5 1 0.5 , color green
The rotating point for the door itself needs to be in the middle, so we choose a simple pp16 object and put it between the 2 curved pieces.
model : pp16
action : create scale 0.6 1 1 , color gold , rotate 3
Now we copy this pp16 object and rotate it in the building mode with 90 percent, so that you get a rotating door. ..

http://wiki.activeworlds.com/index.php?title=Move

http://wiki.activeworlds.com/index.php?title=Rotate

 

Read more about move and rotate on item

26. Animation workshop :

http://www.venice3d.net/2015create26.html