当前位置:网站首页>Set a plane to camera viewport
Set a plane to camera viewport
2022-06-30 05:11:00 【Shannan HSY】
float halfFOV = ( theCamera.fieldOfView * 0.5f ) * Mathf.Deg2Rad;
float aspect = theCamera.aspect;
float height = (theCamera.farClipPlane + 1) * Mathf.Tan(halfFOV);
float width = height * aspect;
plane.position = theCamera.transform.forward * ( theCamera.farClipPlane - 20);
plane.localScale = new Vector3(width * 0.1f * 2, 1, height * 0.1f * 2);
plane.rotation = theCamera.transform.rotation * Quaternion.Euler(90,180,0);
}
边栏推荐
- 【VCS+Verdi聯合仿真】~ 以計數器為例
- Detailed explanation of sorting sort method of JS array
- 【 VCS + Verdi joint simulation】 ~ Taking Counter as an Example
- Parkour demo
- Operation of JSON file
- GoLand No Tests Were Run : 不能使用 fmt.Printf() <BUG>
- ParticleSystem in the official Manual of unity_ Collision module
- Harbor API 2.0 query
- Unity project hosting platform plasticscm (learn to use 2)
- Unity/ue reads OPC UA and OPC Da data (UE4)
猜你喜欢

Deeply understand the function calling process of C language

【 VCS + Verdi joint simulation】 ~ Taking Counter as an Example

Unity packaging and publishing webgl error reason exception: failed building webgl player

Create transfer generation point

Intellj idea jars projects containing external lib to other project reference methods - jars

Pit of smoothstep node in shadergraph

Unity + hololens common basic functions

LxC and LXD container summary

Unity project hosting platform plasticscm (learn to use 2)

Ugui uses its own function to realize reverse mask
随机推荐
力扣27. 移除元素
C # three ways to obtain web page content
Postman 做测试的 6 个常见问题
redis集群概念
Rotation, translation and scaling of unity VR objects
2021-07-29 compilation of Cura in ubantu18.04
Revit secondary development - use panel function without opening the project
Golan no tests were run: fmt Printf() < BUG>
UnityEngine. JsonUtility. The pit of fromjason()
Chapter 12 pipeline monitoring of OpenGL super classic (version 7)
Unity automatic pathfinding
Li Kou 2049: count the number of nodes with the highest score
003-JS-DOM-Attr-innerText
Leetcode 180 Consecutive numbers (2022.06.29)
Unity ugui text value suspended enlarged display add text background
Unity lens making
产生 BUG 测试人员需要自己去分析原因吗?
Unity supports the platform # define instruction of script
Deeply understand the function calling process of C language
Intellj idea generates jar packages for projects containing external lib to other projects. The method refers to the jar package written by itself