/// <inheritdoc /> public void RaiseTeleportCanceled(IMixedRealityPointer pointer, IMixedRealityTeleportHotSpot hotSpot) { // initialize event teleportEventData.Initialize(pointer, hotSpot); // Pass handler HandleEvent(teleportEventData, OnTeleportCanceledHandler); }
/// <summary> /// Raise a teleportation completed event. /// </summary> /// <param name="pointer">The pointer that raised the event.</param> /// <param name="hotSpot">The teleport target</param> private void RaiseTeleportComplete(IMixedRealityPointer pointer, IMixedRealityTeleportHotSpot hotSpot) { if (!isTeleporting) { Debug.LogError("No Active Teleportation in progress."); return; } // initialize event teleportEventData.Initialize(pointer, hotSpot); // Pass handler HandleEvent(teleportEventData, OnTeleportCompletedHandler); isTeleporting = false; }
/// <inheritdoc /> public void RaiseTeleportStarted(IMixedRealityPointer pointer, IMixedRealityTeleportHotSpot hotSpot) { if (isTeleporting) { Debug.LogError("Teleportation already in progress"); return; } isTeleporting = true; // initialize event teleportEventData.Initialize(pointer, hotSpot); // Pass handler HandleEvent(teleportEventData, OnTeleportStartedHandler); ProcessTeleportationRequest(teleportEventData); }
/// <inheritdoc /> public void RaiseTeleportStarted(IMixedRealityPointer pointer, IMixedRealityTeleportHotSpot hotSpot) { if (isTeleporting) { Debug.LogError("Teleportation already in progress"); return; } isTeleporting = true; // initialize event teleportEventData.Initialize(pointer, hotSpot); // Pass handler HandleEvent(teleportEventData, OnTeleportStartedHandler); // In default teleportation mode we do not expect any provider // to handle teleportation, instead we simply perform an instant teleport. if (teleportProvider == null) { PerformDefaultTeleport(teleportEventData); } }
/// <summary> /// Used to initialize/reset the event and populate the data. /// </summary> /// <param name="pointer"></param> /// <param name="target"></param> public void Initialize(IMixedRealityPointer pointer, IMixedRealityTeleportHotSpot target) { BaseInitialize(pointer.InputSourceParent); Pointer = pointer; HotSpot = target; }