当前位置:网站首页>Interaction of Pico neo3 in Unity
Interaction of Pico neo3 in Unity
2022-08-11 07:52:00 【is a small A】
The last article talked about the movement of Pico neo3 in Unity. Today, I will explain how Pico neo3 interacts with UI pages in Unity3D. Many people think that using Pico devices for engine development is too troublesome, and they are not familiar with Pico.API usage, not very understanding of the interaction events of the UI page.
1. First import the Pico SDK into Unity, you can refer to my previous article Import of Pico SDK
2. Delete the Camera that comes with Unity, find the Pvr_UnitySDK subfolder Prefabs, drag the Pvr_UnitySDK prefab under the Prefabs folder into the scene, and the camera is ready, as shown below
Event is the event, Head is the head, EyeMask refers to the eyes of the Pico device, add the script Pvr_Input Module script to the Event, and set the Pico button of the Unity event and UI interaction event. The system defaults to the TouchPad button (that is, the rounded corners).Joystick), this is selected according to your own habits
3. Find the Scenes folder under the Pvr_Controller folder, open the Pvr_Controller_Demo scene in the Scenes folder, find the HeadControl sub-object of the Pvr_UnitySDK, put it in the Assets directory, and then return to the previous scene, the steps are as shown below
4. Put the HeadControl into the Pvr_UnitySDK to make it a child object, the same level as the Head, find the ControllerManager prefab in the Pvr_Controller folder and put it into the scene to become a child object of the Pvr_UnitySDK, which is the same as the Head and the Head in the Pvr_UnitySDK.HeadControl is at the same level, as shown below
5. Add the script Pvr_Controller Demo for ControllerManager, this script comes with PicoSDK, you can add it directly
Enable dot, ray_alpha, ray_LengthAdaptive of the child object of ControllerManager's child object PvrController0
Enable dot, ray_alpha, ray_LengthAdaptive of the child object of ControllerManager's child object PvrController1
Check the Length Adaptive Ray on the ControllerManager component, the specific operation steps are shown in the following figure
6. Create a Canvas, set the Render Mode property of Canvas to World Space, drag the sub-object Head of Pvr_UnitySDK into the Event Camera of Canvas, and add the script Pvr_UI Canvas(Script) to Canvas, this script is provided by PicoSDK,You can add it directly, the steps are as shown below
7. Set the Scale of Canvas to a ratio of 0.05 0.05 1, and create a Button component on Canvas for testing. The test results are as follows
Pico devices can interact with Unity's UI interface
Interaction of UI pages imported by PicoSDK
At this point, the Pico device can interact with Unity on the UI page normally
In the next article, I will share with you the API usage of PicoSDK, so as to complete the interactive operation of Pico handle event type
边栏推荐
- 关于Android Service服务的面试题
- C语言每日一练——Day02:求最小公倍数(3种方法)
- 1051 Multiplication of Complex Numbers (15 points)
- 1106 2019 Sequence (15 points)
- 1101 How many times B is A (15 points)
- Activity的四种启动模式
- TF通过feature与label生成(特征,标签)集合,tf.data.Dataset.from_tensor_slices
- 欢迎加入sumarua网络安全交流社区
- matplotlib
- tf.cast(), reduce_min(), reduce_max()
猜你喜欢
随机推荐
Redis source code-String: Redis String command, Redis String storage principle, three encoding types of Redis string, Redis String SDS source code analysis, Redis String application scenarios
Strongly recommend an easy-to-use API interface
为什么C#中对MySQL不支持中文查询
MindManager2022全新正式免费思维导图更新
流式结构化数据计算语言的进化与新选择
Service的两种状态形式
详述MIMIC 的ICU患者检测时间信息表(十六)
1096 大美数 (15 分)
【软件测试】(北京)字节跳动科技有限公司二面笔试题
【Pytorch】nn.Linear,nn.Conv
1002 Write the number (20 points)
2022-08-09 Group 4 Self-cultivation class study notes (every day)
linux 安装mysql服务报错
JRS303-数据校验
项目2-年收入判断
2022年中国软饮料市场洞察
Two startup methods and differences of Service
redis操作
Evolution and New Choice of Streaming Structured Data Computing Language
2.1-梯度下降