#### Locomotion implementation

Now consider the middle cases from Figure 10.4 of sitting down and wearing a headset. Locomotion can then be simply achieved by moving the viewpoint with a controller. It is helpful to think of the matched zone as a controllable cart that moves across the ground of the virtual environment; see Figure 10.5. First consider the simple case in which the ground is a horizontal plane. Let denote the homogeneous transform that represents the tracked position and orientation of the cyclopean (center) eye in the physical world. The methods described in Section 9.3 could be used to provide for the current time.

The position and orientation of the cart is determined by a controller. The homogeneous matrix:

 (10.1)

encodes the position and orientation of the cart (as a yaw rotation, borrowed from (3.18)). The height is set at in (10.1) so that it does not change the height determined by tracking or other systems (recall from Section 9.2 that the height might be set artificially if the user is sitting in the real world, but standing in the virtual world).

The eye transform is obtained by chaining and to obtain

 (10.2)

Recall from Section 3.4 that the eye transform is the inverse of the transform that places the geometric models. Therefore, (10.2) corresponds to changing the perspective due to the cart, followed by the perspective of the tracked head on the cart.

To move the viewpoint for a fixed direction , the and components are obtained by integrating a differential equation:

 (10.3)

Integrating (10.3) over a time step , the position update appears as

 (10.4)

The variable in (10.3) is the forward speed. The average human walking speed is about meters per second. The virtual cart can be moved forward by pressing a button or key that sets . Another button can be used to assign , which would result in backward motion. If no key or button is held down, then , which causes the cart to remain stopped. An alternative control scheme is to use the two buttons to increase or decrease the speed, until some maximum limit is reached. In this case, motion is sustained without holding down a key.

Keys could also be used to provide lateral motion, in addition to forward/backward motion. This is called strafing in video games. It should be avoided, if possible, because it cases unnecessary lateral vection.

Steven M LaValle 2020-11-11