Entity Path vector

This post may help you in getting the velocity vector: how to get velocity of entity?

The Sandcastle linked in the response is using the entity’s position to compute the velocity vector over time. Once you get the velocity vector, you could normalize it to get the direction and input that into your arrow polyline. The input will be of unit length, so you can adjust the length as you wish.