Just putting stuff I find out over here, so I can remember and find them more easily.
public Vector3(Vector3 a, Vector3 b, Vector3 c) { var u = b - a; //Requires an overloaded minus var v = c - a; //operator for two vector3's. X = (u.Y * v.Z) - (u.Z * v.Y); Y = (u.Z * v.X) - (u.X * v.Z); Z = (u.X * v.Y) - (u.Y * v.X); Normalize(); }
No comments:
Post a Comment