forked from cgvr/DeltaVR
deltavr multiplayer 2.0
This commit is contained in:
31
Assets/_PROJECT/Scripts/PlayerText.cs
Normal file
31
Assets/_PROJECT/Scripts/PlayerText.cs
Normal file
@@ -0,0 +1,31 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using TMPro;
|
||||
|
||||
public class PlayerText : MonoBehaviour
|
||||
{
|
||||
public Transform lookCamera;
|
||||
|
||||
private void Start()
|
||||
{
|
||||
//photonView.RPC("ChangeText", RpcTarget.AllBuffered);
|
||||
GameObject[] players = GameObject.FindGameObjectsWithTag("MainCamera");
|
||||
foreach(GameObject player in players)
|
||||
{
|
||||
// if (player.transform.parent.parent.gameObject.GetPhotonView().IsMine)
|
||||
// {
|
||||
// lookCamera = player.transform;
|
||||
// }
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
private void Update()
|
||||
{
|
||||
transform.LookAt(lookCamera);
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user