当前位置:网站首页>Unity skframework framework (XXIII), minimap small map tool
Unity skframework framework (XXIII), minimap small map tool
2022-07-05 09:24:00 【CoderZ1010】
Catalog
brief introduction
MiniMap It can help us quickly realize the function of small map , The tool has been uploaded to my development framework SKFramework Medium Package Manager In the development kit manager , As shown in the figure , Click on the bottom right corner Install Button to download and install .


SKFramework Framework open source address :
https://github.com/136512892/SKFramework

Realization principle
1. Take... In the scene z The positive direction of the axis is up 、 With x The positive direction of the axis is right ;
2. Take the lower left corner and the upper right corner of the scene as two benchmarks , Record as leftBottom、rightTop;
3. Put the... Of the target object in the scene Transform Record as target3d;
4. Will represent the target object in the interface Icon Icon's RectTransform Record as target2d;
5. Put the small map RectTransform Component record is mapRt;
6. Divide the length of the mini map by the length of the scene to get the proportion in the horizontal direction ;
(mapRt.rect.width / (rightTop.position.x - leftBottom.position.x))
7. Divide the width of the mini map by the width of the scene to get the proportion in the vertical direction ;
(mapRt.rect.height / (rightTop.position.z - leftBottom.position.z))
8. Calculate the length and width of the three-dimensional target object from the base point of the lower left corner , Record as horizontal、vertical;
(horizontal = target3d.position.x - leftBottom.position.x)
(vertical = target3d.position.z - leftBottom.position.z)
9. Calculate in the small map Icon The length and width of the icon from the lower left corner , Record as x、y;
(x = horizontal * Proportion in horizontal direction )
(y = vertical * Scale in the vertical direction )
10.Icon Icon sets the anchor to the lower left corner , Set its position .
(target2d.anchoredPosition = new Vector(x, y))
Instructions

isEnableRot:Icon Whether the icon rotates with the rotation of the 3D target
isEnableRotLerp: Whether to use interpolation operation when calculating rotation value
rotationLerpTime: The time required to interpolate to the target angle



边栏推荐
- Solution to the problem of the 10th Programming Competition (synchronized competition) of Harbin University of technology "Colin Minglun Cup"
- Figure neural network + comparative learning, where to go next?
- notepad++
- Alibaba cloud sends SMS verification code
- 交通运输部、教育部:广泛开展水上交通安全宣传和防溺水安全提醒
- Introduction Guide to stereo vision (4): DLT direct linear transformation of camera calibration [recommended collection]
- Nodejs modularization
- 【组队 PK 赛】本周任务已开启 | 答题挑战,夯实商品详情知识
- 编辑器-vi、vim的使用
- Talking about label smoothing technology
猜你喜欢
![[code practice] [stereo matching series] Classic ad census: (6) multi step parallax optimization](/img/54/cb1373fbe7b21c5383580e8b638a2c.jpg)
[code practice] [stereo matching series] Classic ad census: (6) multi step parallax optimization

Blogger article navigation (classified, real-time update, permanent top)

Svgo v3.9.0+

优先级队列(堆)

Deep understanding of C language pointer
![Multiple solutions to one problem, asp Net core application startup initialization n schemes [Part 1]](/img/c4/27ae0d259abc4e61286c1f4d90c06a.png)
Multiple solutions to one problem, asp Net core application startup initialization n schemes [Part 1]

混淆矩阵(Confusion Matrix)

L'information et l'entropie, tout ce que vous voulez savoir est ici.

Creation and reference of applet

c语言指针深入理解
随机推荐
Confusion matrix
Kotlin introductory notes (II) a brief introduction to kotlin functions
[Yugong series] go teaching course 003-ide installation and basic use in July 2022
Creation and reference of applet
【阅读笔记】图对比学习 GNN+CL
混淆矩阵(Confusion Matrix)
Rebuild my 3D world [open source] [serialization-2]
Introduction Guide to stereo vision (3): Zhang calibration method of camera calibration [ultra detailed and worthy of collection]
驾驶证体检医院(114---2 挂对应的医院司机体检)
Summary and Reflection on issues related to seq2seq, attention and transformer in hands-on deep learning
信息与熵,你想知道的都在这里了
阿里云发送短信验证码
OpenGL - Coordinate Systems
交通运输部、教育部:广泛开展水上交通安全宣传和防溺水安全提醒
Information and entropy, all you want to know is here
Applet network data request
2020 "Lenovo Cup" National College programming online Invitational Competition and the third Shanghai University of technology programming competition
2309. The best English letters with both upper and lower case
一题多解,ASP.NET Core应用启动初始化的N种方案[上篇]
Global configuration tabbar