Skip to content

Instantly share code, notes, and snippets.

@Infinitusvoid
Created May 25, 2021 11:19
Show Gist options
  • Save Infinitusvoid/40754c82845b736c5f4f1d4b86f772ea to your computer and use it in GitHub Desktop.
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?
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