How to get the direction an object is moving ?

For example,

how to get direction of a car in the scene is it moving forward, left right backward etc?


“.transform.forward” is a vector pointing in forward direction of the car. So if dot product of “car.transform.forward” with the current car’s speed vector is >0, then the car some way moves forward (it is strait forward if the dot product equals 1).