I’m trying to understand how Vector2.Dot works…
According to unity docs, these 2 should print the same thing, but it doesn’t:
float projection = Vector2.Dot (velocity, currentNormal);
print(projection);
print((velocity.magnitude * currentNormal.magnitude) * Mathf.Cos(Vector2.Angle(velocity, currentNormal)));
Can someone help me understand what actually is being calculated through the Dot function and how the return value is achieved?
https://docs.unity3d.com/Manual/UnderstandingVectorArithmetic.html