First project upload

This commit is contained in:
Rohan
2026-06-26 22:41:39 +05:30
parent 7f6e734b16
commit 604c0c786a
4637 changed files with 4299718 additions and 489307 deletions

View File

@@ -0,0 +1,32 @@
using UnityEngine;
using UnityEngine.InputSystem;
public class MinimapCameraFollow : MonoBehaviour
{
private Transform target;
public float height = 20f;
void LateUpdate()
{
FindActivePlayer();
if (target == null) return;
transform.position = new Vector3(target.position.x, height, target.position.z);
transform.rotation = Quaternion.Euler(90f, 0f, 0f);
}
void FindActivePlayer()
{
var inputs = FindObjectsOfType<PlayerInput>();
foreach (var input in inputs)
{
if (input.enabled && input.gameObject.activeInHierarchy)
{
target = input.transform;
return;
}
}
}
}