当前位置:网站首页>Unity基础(3)—— unity中的各种坐标系
Unity基础(3)—— unity中的各种坐标系
2022-07-29 04:22:00 【天策府狼崽子】
1. 世界坐标:形象理解就是表示物体在整个无限大的unity空间的位置,有的也称呼为绝对坐标。获取方式:(transform.position)
2. 局部坐标: 就是unity界面屏幕右侧显示的坐标,表示物体相对于父物体的坐标(当父物体置空时两者相同) (transform.localposition)
3. 屏幕坐标:以屏幕左下(0,0)为起点 右上(screen.width, screen.height) 为坐标系中物体在其中的位置,Z值在2D屏幕中为 0
4. 视口(视窗)坐标:以屏幕左下(0,0)为起点 右上(1, 1)的坐标系
5. GUI坐标系:以左上为(0,0)起点 右下(screen.width, screen.height)为坐标系
注意屏幕坐标转世界坐标:由于屏幕坐标为2D 在使用screenToWorldpoint方法时会出错,建议先将物体的世界坐标转为屏幕坐标后赋值给物体的Z轴坐标,重写这个方法。

边栏推荐
- Taobao product details interface (product details page data interface)
- Basic operation of queue
- 你真的会写Restful API吗?
- Machine vision Series 1: Visual Studio 2019 dynamic link library DLL establishment
- 不会就坚持71天吧 链表排序
- Wechat applet parameter transfer
- 不会就坚持66天吧 权重生成随机数
- Won't you just stick to 62 days? Sum of words
- Don't insist on 66 days. Weight generates random numbers
- Is there any way for Youxuan database to check the log volume that the primary cluster transmits to the standby cluster every day?
猜你喜欢

Applet: Area scrolling, pull-down refresh, pull-up load more

Whole house WiFi solution: mesh router networking and ac+ap

Machine vision series 3:vs2019 opencv environment configuration

No, just stick to it for 64 days. Find the insertion location

15.federation

Two forms of softmax cross entropy + numpy implementation

Basic operation of queue

通过js来实现一元二次方程的效果,输入a,b,c系数后可计算出x1和x2的值

C language force buckle question 61 of the rotating list. Double ended queue and construction of circular linked list

Installation and use of stm32cubemx (5.3.0)
随机推荐
Beginner: array & String
9. Delay queue
15.federation
pyscript无法引入包
Whole house WiFi solution: mesh router networking and ac+ap
C language: structure simple syntax summary
It won't last for 70 days. The k-largest number in the array
Fu Yingna: Yuan universe is the new generation of Internet!
11.备份交换机
The function "postgis_version" cannot be found when installing PostGIS
[hands on deep learning] environment configuration (detailed records, starting from the installation of VMware virtual machine)
What is the use of meta-info?
Multi rotor six axis hardware selection
Not for 63 days. The biggest XOR
Pytoch distributed training
Introduction and examples of parameters in Jenkins parametric construction
Exception handling: pyemd or pyemd not found
不会就坚持69天吧 合并区间
Machine vision Series 2: vs DLL debugging
Back propagation process of manual BP neural network