Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Getting 360 angle between two 3d vectors for Unity3D.
public static class Utility
{
public static float CalculateAngle(Vector3 from, Vector3 to)
{
return Quaternion.FromToRotation(Vector3.up, to - from).eulerAngles.z;
}
}
@cesarramirez23

This comment has been minimized.

Copy link

@cesarramirez23 cesarramirez23 commented Nov 11, 2017

thanks

@Vlakdo

This comment has been minimized.

Copy link

@Vlakdo Vlakdo commented Dec 3, 2019

thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment