using System.Collections; using System.Collections.Generic; using UnityEngine; public class MinimapBillboardZ : MonoBehaviour { Vector3 lookat; Quaternion lookRotation; // Update is called once per frame void Update() { lookat = Vector3.up; // Make the object face the camera only in the Y-axis lookRotation = Quaternion.LookRotation(new Vector3(lookat.x, -lookat.y, 0)); // Apply the rotation to the object transform.rotation = lookRotation; } }