Animation workshop (2)

In this second animation class, Bach Zhaa(#360197) explains us how to use the move command and the rotate command , and some special techniques for these commands.

Location of the Workshop : AWSchool 33N 110E .

On the Activeworlds wiki pages, you can view the syntax of these commands :
The move command  
p1cube0200.rwx We start with a prim model , now we type this in the action field:
create move 10 0 0 With the trigger "create" ,the object moves (and returns) when entering into the scene
activate move 0 0 10 With the trigger "activate" the object moves after clicking upon the object
activate move 0 10 0 Here the object moves 10 meters upwards (Y-axis) nstead of horizontally
activate move 10 0 0 time=1 Time=1 : the move is executed during 1 second (is also the default time)
activate move -10 0 0 time=1 A negative value makes the object move 10 meters into the opposite direction
activate move -10 0 0 loop With the loop command, the object moves into this direction (and returns) constantly
activate move 0 5 0 loop reset With the reset command, the object moves but does not return, but restarts the move again
create move 0 0 10 loop reset ltm time=2 With LTM (local transform matrix) , the move follows the axis-lines of the object itself
  Suppose that you rotate the cube with 15 degrees then object moves in that 15 degrees angle
  If you would not use the ltm command, then the object would continue moving horizontally, instead of moving in the direction like the object is rotated.
create move 0 0 10 loop reset ltm time=2 sync With the sync command, you can make objects move simulaneously (=synchronisation)
create move 0 0 10 loop reset time=2 sync wait=1 With the wait command, the object stops moving during the number of second mentioned
create move 0 0 10 loop smooth With the smooth command, the object moves smoothly by making a change in velocity :
  the object moves slowly at the end-points and faster when moving towards these points.
create move 10 20 0 loop gravity With the gravity command , the object moves in a circular/eliptic way, as gravity is involved.
create move 10 20 0 loop gravity time=2 With a longer time period, the object will move in larger circles, as more gravity is involved.
The name command  
For the name command, there are at least 2 objects need in order to execute this command : 1. The objects on which the action is applied to , and 2. the name control object containing the name action command . The name command can be used with the move and the rotate command. For the "name"itself, use lower case characters and simple short names.
p1cube0200.rwx = object on which the action is applied to
create name aa = name command
pole1m.rwx = name control object
activate move 0 0 10 ltm time=2 reset name=aa global = the name action command
  With the global command, the animation can also be seen by the other visitors
activate move 0 0 10 ltm time=2 reset name=cube loop global Instead of using name codes like aa, you can also use names with makes sense
  But the name comand of the other objects must be the same.
9E9 -moves  
9E9 means 9 followed by 000000000 , like you will find on a calculator. These 9E9 moves are used for encroachment issues, when the building inspector mentions that a certain cell has reached its building limit. One of the solutions is moving objects from neighbouring cells which haven't reached the cell limit yet, into the cell where extra objects are needed. Another application of 9E9-moves is by building outside the building cells of the world : if the world is a p10 , then you can still build objects outside that area, as long as they remain within the visibility reach of your avatar. Another application is in Alphaworld, where you can build a bridge with covers a road that has been built by another citizen. You cannot build upon someone else's property in Alphaworld, but which this technique you can build a bridge and continue building at the other side of the road. The road of the other builder will cause no problems.
p1cube0200.rwx = model name
create move 10 0 0 time=0 wait=9e9 wait=9e9 (=wait 248 years) the object will remain on that position for 248 years
create move 10 0 0 time=0 wait=1e1 wait=1e1 (=10 seconds)
create color yellow,move 0 10 0 time=0 wait=9e9 By right-clicking the object (=in the building mode) , the object will be reset.
When going into building mode, you will feel embarrassed , because the objects you are building in the scene are not actually there. There is a way to solve this : then the object will not move again to its original position when going into building mode, and this just by locking the object :
create color yellow,name ycube,move 0 10 0 time=0 wait=9e9 You give the object a name command (ycube)
sign3.rwx You create a name control object
activate move 0 name=ycube In the name action command, here you lock the object (move 0)
If you want to unlock the object again = bring the object back into its original position, then make a micromove object : by clicking upon the micromove object, the objects will be reset again . If you want to lock it back again , then leave the scene and come back into the scene.
sign3.rwx Add another name control object for the micro-move
activate move .01 time=.01 name=ycube global The micromove consists of reactivating the locked object(s) with a small move.
The rotate command  
create rotate 0 10 0,texture tv The object spins arounds one of its axises
create rotate 10 nosync,texture tv sync is default on rotate, so use "nosync" if you don't want to have it on your rotates
create rotate 10 0 0,texture tv The rotation is around the xyz axis of the object itself (and not towards the world properties).
w1pan_0400g.rwx The rotation point for most of the objects is: in the middle of the bottom line of the object
  The objects have been modeled this way , in the building mode you can check the xyz-axis.
flat1a_g.rwx The "flata-" object set is an exception: here the xyz-axis is in the central point of the object.
doorpic2b.rwx Doors have there axis-point at the side, otherwise they wouldn't function as doors.
  Some objects have their axis outside the object : all depends on how they were modeled.
activate rotate 0 60 0 time=1 global This will rotate the door by 360 degrees in 1 second.
activate rotate 0 15 0 time=1 global This will rotate the door by 90 degrees in 1 second.
activate rotate 0 15 0 time=2 global This will rotate the door by 180 degrees in 2 seconds.
activate rotate 0 7.5 0 time=2 global This will rotate the door again by 90 degrees but in 2 seconds.
activate rotate 0 30 0 time=2 global This will rotate the door again by 360 degrees but in 2 seconds.
activate rotate 0 30 0 time=2 smooth global Here again with the smooth command, you will notice a change in velocity
activate rotate 0 15 0 time=2 smooth reset global Also reset is possible
activate rotate 0 240 0 time=.125 wait=5 global This door will move very quickly by 180 degrees and will close again after 5 seconds
activate rotate 0 15 0 time=1 wait=6 smooth global Typical door command
Some tips :
Use the ; between triggers and the , between action commands.
If you use 2 identical commands on 1 object : only the last command will be executed.
Some animations to try out :
******* Cube carroussel Animation ********
Making a kind of carroussel animation by putting 4 models p1cube0200.rwx in a square presentation and rotate the axises of the cubes by 90 degrees, so that the Z-axis points each time to the next cube. The Y-as remains the vertical axis. And add this action for each of the 4 cubes.
create name cube
Now create the name control object, usually a pole1m.rwx -object is used for that.
activate move 0 0 10 ltm time=2 reset name=cube loop
Now click upon the pole to activate the animation and check if the cubes move in a circle. If not, change the distance between the cubes so that they are at a distance of 10 meters of eachother.
******* Sign Animation ********
model : tbsignsq3.rwx // or: eg-sign2
description : hello
action : create color 0,sign bcolor=0 color=yellow ,scale -2 time=1 wait=3 smooth loop,rotate 0 90 0 time=1 wait=3 smooth loop,move 0 .5 0 time=1 wait=3 smooth loop sync

Read more about move and rotate on item

24. Action Commands : Move and rotate.