OpenMetaverse.AgentManager.RequestTeleport C# (CSharp) Method

RequestTeleport() public method

Request teleport to a another simulator
public RequestTeleport ( ulong regionHandle, System.Vector3 position, System.Vector3 lookAt ) : void
regionHandle ulong handle of region to teleport agent to
position System.Vector3 position in destination sim to teleport to
lookAt System.Vector3 direction in destination sim agent will look at
return void
        public void RequestTeleport(ulong regionHandle, Vector3 position, Vector3 lookAt)
        {
            if (Client.Network.CurrentSim != null &&
                Client.Network.CurrentSim.Caps != null &&
                Client.Network.CurrentSim.Caps.IsEventQueueRunning)
            {
                TeleportLocationRequestPacket teleport = new TeleportLocationRequestPacket();
                teleport.AgentData.AgentID = Client.Self.AgentID;
                teleport.AgentData.SessionID = Client.Self.SessionID;
                teleport.Info.LookAt = lookAt;
                teleport.Info.Position = position;
                teleport.Info.RegionHandle = regionHandle;

                Logger.Log("Requesting teleport to region handle " + regionHandle.ToString(), Helpers.LogLevel.Info, Client);

                Client.Network.SendPacket(teleport);
            }
            else
            {
                teleportMessage = "CAPS event queue is not running";
                teleportEvent.Set();
                teleportStat = TeleportStatus.Failed;
            }
        }

Same methods

AgentManager::RequestTeleport ( UUID landmark ) : void
AgentManager::RequestTeleport ( ulong regionHandle, System.Vector3 position ) : void