当前位置:网站首页>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);
}
边栏推荐
- Force buckle 977 Square of ordered array
- How does unity use mapbox to implement real maps in games?
- Unity scroll view element drag and drop to automatically adsorb centering and card effect
- 虚析构和纯虚析构
- 力扣2049:统计最高分的节点数目
- 产生 BUG 测试人员需要自己去分析原因吗?
- East Tower attack and defense world - XSS bypasses the safety dog
- Unity dotween plug-in description
- Records of problems encountered in unity + hololens development
- Passing values between classes using delegates and events
猜你喜欢

Records of some problems encountered during unity development (continuously updated)

力扣59. 螺旋矩阵 II

redis集群概念

Output directory of log files after unity3d packaging

Chinese pycharm changed to English pycharm

Preorder traversal of Li Kou 589:n fork tree

LxC and LXD container summary

PWN入门(2)栈溢出基础

East Tower attack and defense world - XSS bypasses the safety dog

Force buckle 27 Removing Elements
随机推荐
Unity application class and data file path
LXC 和 LXD 容器总结
Intellj idea jars projects containing external lib to other project reference methods - jars
Important knowledge points in unity3d
Configuration and use of controllers and routes in nestjs
Force buckle 209 Minimum length subarray
[vcs+verdi joint simulation] ~ take the counter as an example
Solution to the 292 week match of Li Kou
2021-06-17 solve the problem of QML borderless window stretching, window jitter and flicker when stretching and shrinking
【VCS+Verdi联合仿真】~ 以计数器为例
Four methods of unity ugui button binding events
Chapter 9 of OpenGL super classic (version 7): fragment processing and frame buffering
Chinese pycharm changed to English pycharm
Database base (Study & review for self use)
Leetcode 180 Consecutive numbers (2022.06.29)
Exploration of unity webgl
Display steerable 3D model in front of unity UI
Pycharm database tool
Unity3d packaging and publishing APK process
Unity profiler performance analysis