Discussion in 'General Help' started by jetp250, Jul 8, 2016.
The title tells it all, is there even a difference? As they both return a vector.
toVector() just returns a vector with the coordinates of the location. So a Location (10, 9, 8) to vector would be a vector (10, 9, 8).
@I Al Istannen Thanks! How about the getDirection()? Does it return a normalized toVector() or something? Still confused, but that explains a lot already.
A player can look somewhere. He can look up, down, left, right and so on. This is called the direction. So, the Location#getDirection() returns a unit vector (= normalized) pointing in the direction the player is looking.
It has nothing to do with the toVector() method.
Separate names with a comma.