首页 > 解决方案 > Unity & Leap Motion - 如何获取实时手部数据?

问题描述

抱歉,如果这是一个愚蠢的问题,但我在 Leap Motion Docs 中搜索了 Unity 并且无法弄清楚如何解决我的问题。

我只想从我添加到场景中的脚本中访问跳跃运动控制器检测到的当前手(及其数据,如 PalmNormal 等)。

提前致谢!

标签: unity3dvirtual-realityleap-motion

解决方案


我快速浏览了一下,也许这就是您要找的课程? https://leapmotion.github.io/UnityModules/class_leap_1_1_hand.html
例如你想要 PalmPosition

Hand currentHand = new Hand();
currentHand.PalmPosition;

这是它包含的所有内容


Hand    (   long    frameID,
int     id,
float   confidence,
float   grabStrength,
float   grabAngle,
float   pinchStrength,
float   pinchDistance,
float   palmWidth,
bool    isLeft,
float   timeVisible,
Arm     arm,
List< Finger >  fingers,
Vector  palmPosition,
Vector  stabilizedPalmPosition,
Vector  palmVelocity,
Vector  palmNormal,
LeapQuaternion  palmOrientation,
Vector  direction,
Vector  wristPosition 
)   

推荐阅读