Now, let's explore the steps necessary to get the information we need to provide a movement instruction. It might look intimidating at first, but we will break down each section and see how each node fits into the larger goal.
The first calculation we need to perform is to take our vector value for direction and normalize it. Normalizing is a common procedure in vector math that ensures that the vector is converted to a length of one unit, which makes it compatible with the rest of our calculations. Fortunately, there is a Blueprint node that takes care of this for us.
Click on the Direction variable we created in the My Blueprint panel, and drag it to an empty space in Event Graph. A small popup appears, prompting you to select GET or SET. We want to retrieve the value we set for the direction, so let's choose GET to create a node containing the Direction variable's value. Click on the output pin of the Direction node, and drop it in empty graph space. Type normalize in the search field and select the Normalize node underneath the category-labeled vector. This connects your Direction variable to a node that automatically does the normalizing calculation for us: