Primitive Methods

Default picture for illustration purposes

 

Move:   moves the object in the direction selected (from the object’s perspective!)  This means that the object is still facing the same way as before .

Options:  Direction:

                        Up (off the ground)

                        Down (into the ground)

                        Left

                        Right

Forward (toward the camera)  Alice has moved forward but the penguin has not, as Alice was moved forward 5 meters.

                          

                        Backward (away from the camera)

                                    Distance is selected/specified by the programmer

                                    Duration is selected/specified by the programmer (default 1 sec)

Turn  “turns” the object in the direction selected.  This means that the object will change the direction that it is facing.

Options:  Direction:

                        Left

                        Right

Forward (face down toward the ground)  Alice is laying on the ground face down after being turned forward ¼ revolution

                       

                        Backward (face up on the ground …”faints”)

                                    Revolution is selected/specified by the programmer

Roll  “roll” with center held stationary as the pivot point (for people, their center is at their feet), rotate the object

Options:  Direction:

            Left :  Alice is now laying on her left side after being “rolled”, left, ¼ revolution

                       

            Right

                        Revolution is selected/specified by the programmer

Resize “grow”/ “shrink” the object by the specified amount

Say  text displayed inside a call out (speech bubble).  Penguin says “Hello”.

           

Think  text displayed inside a call out, cloud bubble.

Sound  can incorporate a sound associated with an object.  Can select from a list of default sounds (e.g. gong, etc.) or import WAV or MP3 sound file.  In order to do this, the sound file must be imported to Alice (see page 93 completing the animation)

Move To  This moves the object’s center to the destination object’s center position. 

1.  This example shows the result of the penguin being moved to Alice.  Notice that penguin’s feet (center) are directly on Alice’s feet (her center).

                       

2.  .  This example shows the result of the penguin being moved to Alice’s right arm.  Notice that penguin’s feet (center) are directly on Alice’s shoulder (her arm’s center).

                       

  1. This example shows the result of the penguin being moved to Alice after she has been turned backward 1/8 revolution.  Note that the penguin’s orientation has not changed, just its position. (Compare to Set Point of View To )

Move Toward  By a programmer specified distance,  moves the object in the direction of  destination object’s center. ( Works like Move To, except that the programmer controls how far to move the object toward the destination)

Move Away From  By a programmer specified distance, move the object away from the selected object based on the center of each object (regardless of the way each object is facing).  Each illustrations show penguin Move Away From Alice by one meter.

·        If penguin is slightly in front of Alice he moves in a forward direction (from Alice’s perspective).

·        If penguin is slightly to the left of Alice he moves in the left direction (from Alice’s perspective)

·        If penguin is above/below Alice he moves further above/below Alice (from Alice’s perspective)

Initial (penguin just in front of Alice)       Penguin Move Away From Alice (1m)

                                                                            

Initial position (just to left of Alice)          Penguin move away from Alice (1 meter)

                   

Orient To  The selected object will “face the same direction as”  the target object faces.  For example, if we select Alice and orient to the camera, Alice will turn and face the direction that the camera faces (so she will turn around). 

           

Example 2:  Alice is selected and we orient to the Light.  Since the light is shining down from above, Alice will now face down toward the ground at an angle.

Turn To Face  The selected object will now be positioned to look directly at target.  As describe on page 47, the selected object will “pivot around until its front is facing” the target.

Example 1.  Initially, Alice and the penguin are on the same horizontal line.  This example shows the penguin turn to face Alice.

Example 2.  The penguin has been moved up (off of the ground) one meter.  Then we see Alice turn to face the penguin. Note that Alice remains perpendicular to the ground.

           

Point At With Point At, the selected object’s center is aligned with the target object’s center.  Here we see Alice turn to point at the penguin (who has been lifted 1 meter off the ground).  This is like drawing a straight line from Alice’s center to the penguin’s center  (Compare to Turn to Face… notice Alice is no longer perpendicular to the ground).

           

Set Point of View To Have the selected object’s center align itself with the target object’s center in terms of position and orientation.

Example:  Here is the penguin Set Point of View To Alice (who has been turned backward 1/8 revolution).

Set Pose allows the programmer to alter the actual object’s position immediately (during code development) using the mouse– this is not an executed method at run-time.

Stand Up “rights” the target object on their feet.  Note however that the final direction they will face is not consistent! 

E.g.   1 penguin.roll left ¼ turn

                     2 penguin. StandUp

can yield varying results.                          

After #1 penguin.roll  -- penguin is laying on the ground

Here are two sample results after executing penguin.standup method

 

                  sample 1

                  sample 2

Move At Speed same as Move method but programmer sets the speed.  The object moves for one second at the speed selected, therefore the distance the object travels is based on how far the object moves (in one second ) at the speed selected.  Note that the selected speed is constant, therefore it is not changed by selecting a different duration option as in Move.

Turn At Speed same as Turn method but the programmer sets the speed.  The object turns for one second at the speed selected.  Note that the duration option does not alter the speed (different from Turn); duration just determines “how long” at the selected speed.

Roll At Speed same as Roll method but the programmer sets the speed. The object rolls for one second at the speed selected.  Note that the duration option does not alter the speed (different from Roll); duration just determines “how long” at the selected speed.

Constrain to Face method behaves exactly like Turn To Face except that the result is instantaneous, not gradual as Turn To Face.

Constrain to Point At works exactly like Point At except that the result is instantaneous, not gradual as Point At.