【VR】Leap Motion 官网文档 Unity插件概述
前言:
Leap Motion的官网文档已经有不少的热心网友参与了翻译,但没有覆盖官网文档的全部。
为迎合Unity VR的热潮与大家的学习需要,本博客将推出针对Unity方向的官方文档翻译系列。
本篇主要对Leap Motion的Unity插件及坐标系系统进行简述。
英文原文网址:https://developer.leapmotion.com/documentation/unity/unity/Unity_Overview.html
译文首发&持续更新:http://blog.csdn.net/duzixi
Unity Plugin Overview 插件概述
The Leap Motion Controller tracks hands and fingers and reports position, velocity, and orientation with low latency and good accuracy. The controller can be used on a tabletop or mounted on a VR headset.
Leap Motion控制器追踪手和手指并低延迟、高精度的返回位置、速度以及方向。该设备即可以放在桌面上使用,也可以作为VR头盔上的附加设备使用。
The Leap Motion controller system consists of a hardware device and a software component which runs as a service or daemon on the host computer. The software component analyses images produced by the hardware and sends tracking information to applications. The Leap motion Unity plugin connects to this service to get data. Scripts included with the plugin translate Leap Motion coordinates to the Unity coordinate system. These scripts and additional graphic assets make it easy to add 3D, motion-controlled hands to a Unity scene.
Leap Motion 控制器系统包含硬件设备和软件组件两个部分,软件组件可以以服务或后台进程的形式运行在主机上。软件组件负责分析硬件生成的图像信息,并将追踪信息发送到应用程序中。Leap Motion的Unity插件与该服务建立连接并获取数据。插件中包含的脚本将Leap Motion坐标(译者注:右手坐标系)转换成Unity坐标系(译者注:左手坐标系)。通过这些脚本和附带的图形资源,可以非常方便的在Unity场景中添加3D的运动控制手模型。
Coordinate Systems 坐标系
Unity3D uses a left-handed convention for its coordinate system, wheras the Leap Motion API uses a right-handed convention. (Essentially, the z-axis points in the opposite direction.) Unity also uses a default unit of meters, wheras the Leap Motion API uses millimeters. The plugin scripts internally transforms the tracking data to use the left-handed coordinate system and scales distance values to meters.
When you get tracking data directly from one of the classes in the Leap C# library, the data are in the native Leap coordinate system – not the Unity coordinate system. You can use the utility functions in the
LeapUnityExtensions file to convert from Leap Motion coordinates to Unity coordinates. ToUnity()
converts the axes
from right-handed to left-handed and returns a Unity Vector3 object. ToUnityScaled()
also scales the coordinates
from milimeters to meters. ToUnity()
is
typically used
with direction
vectors; ``ToUnityScaled()
with positions.
当你从Leap C#库的某个类中直接获取数据时,数据是原生的Leap坐标系——而非Unity坐标系。你可以使用LeapUnityExtensions文件中的工具方法将Leap Motion 坐标系转换成Unity坐标系。
ToUnity() 方法将右手轴转换成左手轴并返回Unity的Vector3类型变量。
Hand Tracking 手部追踪
The Leap Motion controller uses optical sensors and infrared light. The sensors have a field of view of about 150 degrees. The effective range of the Leap Motion Controller extends from approximately .03 to .6 meters above the device (1 inch to 2 feet).
Detection and tracking work best when the controller has a clear, high-contrast view of an object’s silhouette. The Leap Motion software combines its sensor data with an internal model of the human hand to help cope with challenging tracking conditions.
郑重声明:本站内容如果来自互联网及其他传播媒体,其版权均属原媒体及文章作者所有。转载目的在于传递更多信息及用于网络分享,并不代表本站赞同其观点和对其真实性负责,也不构成任何其他建议。