Moving the turtle
Moving the Turtle
Moving commands are commands that won't change the turtle's orientation. There are three different ways to move the turtle around the space. The default settings in the Quick Command window place the distance that the turtle moves as one meter, this can be changed by clicking the up or down arrows in the Distance (meter): field in the Quick Command window.
There are many commands that can change the turtle's location. These commands can be classified according to their Frame+of+Reference. There are three frames of reference in VRMath2.
1. Egocentric
Egocentric commands are object based; if you tell the the object (the turtle) to move forward, it will move in the direction it is facing. In the Quick Command window the egocentric commands are the green arrows. Using these commands, you can tell the turtle to move forward or backwards. The left and right arrows tell the turtle to turn left or right, which is discussed more in Turning the turtle. You can also move the turtle by typing command words into the Command field, found in the Console window.
When moving the turtle by a command word:
Forward = FD (no.) or FORWARD (no.)
Backwards = BK (no.) or BACK (no.) or BACKWARDS (no.)
Where (no.) is the number of units you want the turtle to move forward or backwards. Make sure there is a space between the end of the command word and the variable (number of units you wish the turtle to move).
For example, FD 3 BK 2 will move the turtle forward 3 units then back 2 units.
2. Fixed
These commands are directional commands, they are fixed and do not change if the turtle changes direction. In the Quick Command window the fixed commands are the compass arrows. Using these commands you can tell the turtle to move north, south, east, west, up, or down.
When moving the turtle in a fixed direction using a command word:
Up (the turtle moves towards the sky) = UP (no.)
Down ( the turtle moves towards the ground) = DOWN (no.) or DN (no.)
East (the turtle moves east) = EAST (no.)
West (the turtle moves west) = WEST (no.)
North (the turtle moves north) = NORTH (no.)
South (the turtle goes south) = SOUTH (no.)
Where as with the egocentric commands, (no.) stands for the number of units you want the turtle to move in that direction, and a space must be put between the command word and the variable.
For example, UP 1 EAST 2 NORTH 2
3. Coordinate
These commands are based on the Cartesian coordinate system adopted in VRMath2, where the positive y axis is pointing up, the negative y axis is pointing down, the positive x axis is left, the negative x axis is right, the positive z axis is backwards and the negative z axis is forward (as shown below). There is no representation of the coordinate system in the Quick Command window.
Some of the commands for the coordinate system include:
SETPOS, SETXYZ, SETX, SETY, SETZ
For example the command SETXYZ 1 2 -1 will move the turtle to position (1, -2, 1).
There is also a set of jump commands associated with every moving command. You can just add "JUMP" before every moving command. For examples, JUMPFORWARD or JF, JUMPBACK or JB, JUMPEAST or JE, JUMPUP or JU, JUMPXYZ or JXYZ, JUMPX or JX etc. This JUMP series commands act the same when you just move the turtle. But they will have effect when you are creating turtle tracks objects (which is discussed in Creating objects . For example, JUMP series commands mean temporarily no tracks, or end of a face.
- 3872 reads