Created
May 25, 2021 11:19
-
-
Save Infinitusvoid/40754c82845b736c5f4f1d4b86f772ea to your computer and use it in GitHub Desktop.
Unity : How to get vector that represents normalized direction from vector to vector?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static Vector3 DirectionTo(this Vector3 source, Vector3 destination) | |
{ | |
return Vector3.Normalize(destination - source); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment