Пример #1
0
        public static Quaternion LookAt(ServerSideObject source, ServerSideObject dest)
        {
            Vector3 sourcePoint = new Vector3(source.GetXPos(), 0, source.GetZPos());
            Vector3 destPoint   = new Vector3(dest.GetXPos(), 0, dest.GetZPos());

            return(LookAt(sourcePoint, destPoint));
        }
Пример #2
0
 public static float Distance(ServerSideObject a, ServerSideObject b)
 {
     return(Vector2.Distance(new Vector2(a.GetXPos(), a.GetZPos()), new Vector2(b.GetXPos(), b.GetZPos())) - a.radius - b.radius);
 }