当前位置:网站首页>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);
}
边栏推荐
- pytorch中常用损失函数总结
- Unity scroll view element drag and drop to automatically adsorb centering and card effect
- Passing values between classes using delegates and events
- Unity + hololens publishing settings
- Win10 vs2015 compiling curaengine
- Golan no tests were run: fmt Printf() < BUG>
- Output directory of log files after unity3d packaging
- Unity application class and data file path
- 2021-06-17 solve the problem of QML borderless window stretching, window jitter and flicker when stretching and shrinking
- 东塔攻防世界—xss绕过安全狗
猜你喜欢
![[notes] unity webgl input Chinese](/img/f7/805f510ff691227b4c2b529cc1099a.jpg)
[notes] unity webgl input Chinese

Parkour demo

Force buckle 27 Removing Elements

Writing unityshader with sublimetext
Sourcetree usage

Unity + hololens2 performance test

Pit of smoothstep node in shadergraph

Preorder traversal of Li Kou 589:n fork tree

Some problems encountered in unity steamvr

Pytorch的安装以及入门使用
随机推荐
Solution to the 292 week match of Li Kou
Unity Logitech steering wheel access
Harbor API 2.0 query
Unity3d realizes Google Digital Earth
2021-07-29 compilation of Cura in ubantu18.04
Records of some problems encountered during unity development (continuously updated)
Four methods of unity ugui button binding events
amd锐龙CPU A320系列主板如何安装win7
redis集群概念
Configuration and use of controllers and routes in nestjs
Modbus protocol register
PWN Introduction (2) stack overflow Foundation
Force buckle 59 Spiral matrix II
Chapter 10 of OpenGL super classic (7th Edition) calculation shader
[vcs+verdi joint simulation] ~ take the counter as an example
mmdet之Loss模块详解
UnityEngine. JsonUtility. The pit of fromjason()
QT connecting external libraries
Pit of smoothstep node in shadergraph
Nestjs configures static resources, template engine, and post examples