Skip to main content
File: Assets/_MolcaSDK/_VR/Scripts/Scenario/Steps/TeleportStep.cs
Base: Step

Role

Subscribes to TeleportingEvent while active; handler currently logs the destination only. Does not call Complete() in the SDK version— treat as a stub or extend locally.

Code

Assign teleportingEvent from your XR teleport/locomotion stack. Stock OnTeleportRequest only logs — fork or patch so the handler completes the step, for example:
private void OnTeleportRequest(TeleportingEventArgs args)
{
    Debug.Log("Teleporting to " + args.teleportRequest.destinationPosition);
    Complete();
}
Until Complete() runs from that callback (or a custom Step), the sequence will not advance.

Troubleshooting

  • Step never completes — Expected with stock TeleportStep.cs: add Complete() in the teleport callback or replace with a custom Step.
  • Null reference — Assign teleportingEvent reference from your locomotion/teleport setup.
  • Multiple teleports — Decide whether first teleport only should complete (track a bool before calling Complete()).

Unity Editor

TeleportStep on player rig or training volume.

TeleportStep in Unity Inspector