/// <summary> /// Moves this Character in distance to the given object, by moving this Character /// on the XY-Plane of the given object and adjust the Z-distance. /// </summary> public void EnsureZDistance(WorldObject obj, float distance, bool wait) { var pos = new Vector3(obj.Position.X, obj.Position.Y, obj.Position.Z + distance); TeleportTo(obj.Map, ref pos, null, wait); if (wait) { Assert.AreEqual(obj.GetDistance(this), distance, "Teleporting did not work correctly."); } }