mirror of
https://github.com/DerTyp7/fps-citybuild-unity.git
synced 2025-10-30 12:37:08 +01:00
updated
This commit is contained in:
17
Assets/HUD/Minimap/Minimap.cs
Normal file
17
Assets/HUD/Minimap/Minimap.cs
Normal file
@@ -0,0 +1,17 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
public class Minimap : MonoBehaviour
|
||||
{
|
||||
[SerializeField] private Transform player;
|
||||
|
||||
private void LateUpdate()
|
||||
{
|
||||
Vector3 newPosition = player.position;
|
||||
newPosition.y = transform.position.y;
|
||||
transform.position = newPosition;
|
||||
|
||||
transform.rotation = Quaternion.Euler(90f, player.eulerAngles.y, 0f);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user