The required behavior of the avatar is complex: it should walk trough winding paths, going up- and downstairs, and should wait for the participant.
The path is divided into steps. The task of the avatar is to walk from step 0 to step 1, standing there till the participant is close to it, then walk from step 1 to step 2, and so on. When walking the avatar calculates the distance left from the target step. When over the target (distance < 10cm) it stands, and it calculate the distance of the participant. When the participant is close (distance < 1m) it walks toward the next step.