static float Distance(Vec3& a, Vec3& b)

Vec3& a The first point.
Vec3& b And the second point!
RETURNS: float Distance between the two points.

Calculates the distance between two points in space! Make sure they’re in the same coordinate space! Uses a Sqrt, so it’s not blazing fast, prefer DistanceSq when possible.


Vec3 pointA = new Vec3(3,2,5);
Vec3 pointB = new Vec3(3,2,8);
float distance = Vec3.Distance(pointA, pointB);