add map menu
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
using UnityEngine;
|
||||
|
||||
public class MiniMapCam : MonoBehaviour
|
||||
{
|
||||
Transform playerTransform;
|
||||
Transform camHomeTransform;
|
||||
|
||||
void LateUpdate()
|
||||
{
|
||||
if (playerTransform == null)
|
||||
{
|
||||
playerTransform = GameManager.Instance.PlayerController.transform;
|
||||
}
|
||||
if (camHomeTransform == null)
|
||||
{
|
||||
camHomeTransform = GameManager.Instance.PlayerController.cameraController.playerCamHome;
|
||||
}
|
||||
|
||||
Vector3 newPosition = playerTransform.position;
|
||||
newPosition.y = transform.position.y;
|
||||
transform.position = newPosition;
|
||||
|
||||
transform.rotation = Quaternion.Euler(90, camHomeTransform.eulerAngles.y, 0);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user