mirror of
https://github.com/Leahnaya/TheKingsRace.git
synced 2026-09-14 21:35:17 -05:00
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:
@@ -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));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user