Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
FOVを求める
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);
Debug.Log(distance);
}
}
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.