(3) Running

83 Running Code

To ensure that we face the correct direction we use a vector.

The Y Vector gives us VERTICAL direction.

The X Vector gives us HORIZONTAL direction.

Negative X values represent LEFT

Positive X values represent RIGHT

If we are on the floor we play our Run animation.

Use System --> Compare two values

Learn more about Vectors here: Vectors