Fixed NetworkTransforms and Added Host IP

- Fixed placement of NetworkTransform on Prefab - Needs to be on the
  same level as the character controller and movement
- Added a display of the host IP address in the lobby
This commit is contained in:
2021-11-03 14:03:43 -05:00
parent a47550e85b
commit 2953687180
14 changed files with 252 additions and 466 deletions

View File

@@ -1,8 +1,9 @@
using System.Collections;
using System.Collections.Generic;
using MLAPI;
using UnityEngine;
public class PlayerCam : MonoBehaviour
public class PlayerCam : NetworkBehaviour
{
public GameObject player;
@@ -16,6 +17,8 @@ public class PlayerCam : MonoBehaviour
void Update ()
{
if (!IsLocalPlayer) { return; }
offset = transform.parent.forward * rad.magnitude;
transform.position = new Vector3((player.transform.position.x - offset.x),((player.transform.position.y - offset.y)+2),(player.transform.position.z - offset.z));