Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
using UnityEngine;
public class HeightTest : MonoBehaviour
public float frustumHeight; // 対象の大きさ(高さ)
public float fov = 40; // FOV
void Start ()
var distance = frustumHeight * 0.5f / Mathf.Tan(fov * 0.5f * Mathf.Deg2Rad);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.