Relative Mode

What is Relative Mode?

Relative Mode changes the way the agent interacts with the environment by using the front of the agent as its anchor. Activate Relative Mode by clicking and turning on the checkbox, instructing the agent to use its front as the reference point.

Move action open

For example, if you rotate the agent by 90 degrees and move forward in Relative Mode, the agent will move in the direction it is facing rather than upwards.

What Can You Do with Relative Mode?

Relative Mode was created to simplify the development of first-person projects. It allows you to program agents to follow commands based on their orientation, making movements relative to their front. For example, you can make an agent move exclusively in Relative Mode, similar to turtle mode.

How to Set a New Front

In first-person view, you can rotate the camera to establish a new "front" for the agent. This feature is useful for adjusting the front when an agent is drawn in a different orientation.

VAT Commands:

The front of the agent is approximated to the nearest 90 degrees. For example, if the agent is facing 94 degrees, it is considered to be facing 90 degrees.

Example Project

Relative Mode and Labels project

In this simple example the frog moves using the relative mode.