コード例 #1
0
ファイル: VRC_PlayerApi.cs プロジェクト: Bectinced-aeN/vrcsdk
 public void TeleportTo(Vector3 teleportPos, Quaternion teleportRot, VRC_SceneDescriptor.SpawnOrientation teleportOrientation)
 {
     //IL_0010: Unknown result type (might be due to invalid IL or missing references)
     //IL_0011: Unknown result type (might be due to invalid IL or missing references)
     if (_TeleportToOrientation != null)
     {
         _TeleportToOrientation(this, teleportPos, teleportRot, teleportOrientation);
     }
 }
コード例 #2
0
ファイル: SpawnManager.cs プロジェクト: Smoothstep/VRChat
    // Token: 0x06005506 RID: 21766 RVA: 0x001D5058 File Offset: 0x001D3458
    public void AlignTrackingToPlayer(VRCPlayer player, VRC_SceneDescriptor.SpawnOrientation orientation)
    {
        if (player == null || !player.isLocal)
        {
            return;
        }
        bool flag = !VRCTrackingManager.GetSeatedPlayMode() && (orientation == VRC_SceneDescriptor.SpawnOrientation.AlignRoomWithSpawnPoint || this.spawnOrder == VRC_SceneDescriptor.SpawnOrder.Demo);

        if (flag)
        {
            player.AlignTrackingToPlayer();
        }
    }
コード例 #3
0
    // Token: 0x060051BC RID: 20924 RVA: 0x001BF6A0 File Offset: 0x001BDAA0
    public virtual void Teleport(Vector3 teleportPos, Quaternion teleportRot, VRC_SceneDescriptor.SpawnOrientation teleportOrientation = VRC_SceneDescriptor.SpawnOrientation.Default)
    {
        Vector3 eulerAngles = teleportRot.eulerAngles;

        eulerAngles.x = (eulerAngles.z = 0f);
        IEnumerable <SyncPhysics> componentsInChildren = base.GetComponentsInChildren <SyncPhysics>();

        foreach (SyncPhysics syncPhysics in componentsInChildren)
        {
            syncPhysics.TeleportTo(teleportPos, Quaternion.Euler(eulerAngles));
        }
        if (componentsInChildren.FirstOrDefault <SyncPhysics>() == null)
        {
            base.transform.position = teleportPos;
            base.transform.rotation = Quaternion.Euler(eulerAngles);
        }
        SpawnManager.Instance.AlignTrackingToPlayer(base.GetComponentInParent <VRCPlayer>());
    }
コード例 #4
0
ファイル: CyanEmuPlayerManager.cs プロジェクト: esnya/CyanEmu
 public static void TeleportToOrientation(VRCPlayerApi player, Vector3 position, Quaternion rotation, VRC_SceneDescriptor.SpawnOrientation orientation)
 {
     TeleportToOrientationLerp(player, position, rotation, VRC_SceneDescriptor.SpawnOrientation.Default, false);
 }
コード例 #5
0
ファイル: CyanEmuPlayerManager.cs プロジェクト: esnya/CyanEmu
        public static void TeleportToOrientationLerp(VRCPlayerApi player, Vector3 position, Quaternion rotation, VRC_SceneDescriptor.SpawnOrientation orientation, bool lerp)
        {
            if (!player.isLocal)
            {
                player.LogWarning("[VRCPlayerAPI.TeleportTo] Teleporting remote players will do nothing.");
                return;
            }

            // Ignore lerp since there is no networking here
            player.GetPlayerController().Teleport(position, rotation, orientation == VRC_SceneDescriptor.SpawnOrientation.AlignRoomWithSpawnPoint);
        }
コード例 #6
0
 public static void TeleportToOrientation(VRCPlayerApi player, Vector3 position, Quaternion rotation, VRC_SceneDescriptor.SpawnOrientation orientation)
 {
     if (!player.isLocal)
     {
         return;
     }
     player.GetPlayerController().Teleport(position, rotation, orientation == VRC_SceneDescriptor.SpawnOrientation.AlignRoomWithSpawnPoint);
 }
コード例 #7
0
 public static void TeleportToOrientationLerp(VRCPlayerApi player, Vector3 position, Quaternion rotation, VRC_SceneDescriptor.SpawnOrientation orientation, bool lerp)
 {
     // Ignore lerp since there is no networking here
     TeleportToOrientation(player, position, rotation, orientation);
 }
コード例 #8
0
 // Token: 0x060051F8 RID: 20984 RVA: 0x001C0CB8 File Offset: 0x001BF0B8
 public static void TeleportToOrientation(VRC_PlayerApi player, Vector3 teleportPos, Quaternion teleportRot, VRC_SceneDescriptor.SpawnOrientation teleportOrientation)
 {
     if (player != null)
     {
         player.GetComponent <SyncPhysics>().DiscontinuityHint = true;
         LocomotionInputController component = player.GetComponent <LocomotionInputController>();
         if (component != null)
         {
             component.Teleport(teleportPos, teleportRot, teleportOrientation);
         }
         else
         {
             VRC.Network.RPC(player.GetComponent <VRC.Player>(), player.gameObject, "Teleport", new object[]
             {
                 teleportPos,
                 teleportRot,
                 teleportOrientation
             });
         }
     }
     else
     {
         Debug.LogError("Attempted to teleport a null player!");
     }
 }
コード例 #9
0
 // Token: 0x060051C3 RID: 20931 RVA: 0x001C056D File Offset: 0x001BE96D
 public override void Teleport(Vector3 teleportPos, Quaternion teleportRot, VRC_SceneDescriptor.SpawnOrientation teleportOrientation = VRC_SceneDescriptor.SpawnOrientation.Default)
 {
     base.Teleport(teleportPos, teleportRot, teleportOrientation);
     this.ForceTrackingLink();
 }