位置: 编程技术 - 正文

【VR】Leap Motion 官网文档 HandController(手部控制器)(vrbrations)

编辑:rootadmin

推荐整理分享【VR】Leap Motion 官网文档 HandController(手部控制器)(vrbrations),希望有所帮助,仅作参考,欢迎阅读内容。

文章相关热门搜索词:vr-very rare,vr project,vr the,vr the,vr project,vr website,#vr#,#vr#,内容如对您有帮助,希望把文章链接给更多的朋友!

前言:

本系列译文是为迎合Unity VR的热潮与大家的学习需要,推出的针对Unity方向的Leap Motion官方文档中英对照翻译。 本篇第五篇 《HandController(手部控制器)》 介绍了HandController(手部控制器)预设体与HandController脚本组件使用,以及HandController类中定义的各个公共属性与方法。

HandController 手部控制器

The HandController script is attached to the HandController prefab. The prefab serves as the anchor point for drawing hands. You can set the HandController properties, such as which hand prefabs to use, in the Inspector panel.

HandController脚本组件添加在HandController(手部控制器)预设体上。该预设体是用来绘制手型的锚点。你可以在检视面板中设置HandController的属性,例如使用哪种手型预设体等。

When you play the scene, any hands detected by the Leap Motion controller are drawn relative to the position and orientation of the prefab.

当你运行场景之后,Leap Motion 控制器检测到的所有手型都将相对于该预设体的位置和方向进行绘制。

If your hand is cm above the Leap Motion device, the virtual hand is drawn cm above the prefab position (if the HandController transform scale is set to 1.0). Do note that the default scale is :1, so hands are drawn much larger than real-size. In the Unity Scene view, the approximate field of view of the Leap Motion sensors are shown.

如果手在Leap Motion设备上方厘米,虚拟手讲被绘制在预设体上方厘米(前提是HandController对象的Transfom组件的scale&#;为1)。需要注意的是,默认情况下缩放比例为:1,因而场景中绘制出来的手型要比实际大得多。在Unity场景视图中我们可以看到Leap Motion传感器的近&#;视野区域。

class HandController HandController 类

The Controller object that instantiates hands and tools to represent the hands and tools tracked by the Leap Motion device.

该控制器对象用于实例化Leap Motion设备追踪的手部和工具。

HandController is a Unity MonoBehavior instance that serves as the interface between your Unity application and the Leap Motion service.

HandController类是Unity MonoBehavior类的子类,是Unity应用程序和Leap Motion服务的接口。

The HandController script is attached to the HandController prefab. Drop a HandController prefab into a scene to add 3D, motion-controlled hands. The hands are placed above the prefab at their real-world relationship to the physical Leap device. You can change the transform of the prefab to adjust the orientation and the size of the hands in the scene. You can change the HandController.handMovementScale property to change the range of motion of the hands without changing the apparent model size.

HandController脚本添加在HandController预设体上。将HandController预设体拖拽到场景中可以添加3D的动作控制手型。手型会根据真实世界的物理Leap设备感知出现在预设体上方。你可以通过改变该预设体Transform组件的属性&#;来调整场景中手型的方向和大小。改变HandController.handMovementScale属性可以在不改变手型大小的前提下改变手部运动的范围。

When the HandController is active in a scene, it adds the specified 3D models for the hands to the scene whenever physical hands are tracked by the Leap Motion hardware. By default, these objects are destroyed when the physical hands are lost and recreated when tracking resumes. The asset package provides a variety of hands that you can use in conjunction with the hand controller.

若手部控制器在场景中处于激活状态,就会在Leap Motion硬件设备追踪到手部时,在场景中添加指定的3D手型。默认情况下,这些对象会在追踪不到时销毁,再次追踪到时重新创建。资源包提供了多种手型,与手部控制器结合使用。

Public Functions 公共函数

void DestroyAllHands() 销毁所有手型

Destroys all hands owned by this HandController instance.

销毁当前HandController类实例化的所有手型。

string FinishAndSaveRecording() 完成并保存记录

Saves the current recording to a new file, returns the path, and starts playback.

保存当前记录到一个新的文件中,返回路径,并播放

Return 返回&#;string The path to the saved recording. 字符串类型 记录所保存的路径。

HandModel [] GetAllGraphicsHands() 获取所有图形手型

Returns a copy of the hand model list. 返回手部模型列表的拷贝

HandModel [] GetAllPhysicsHands() 获取所有物理手型

Returns a copy of the physics model list. 返回物理模型列表的拷贝

Frame GetFrame() 获取帧

Returns the latest frame object. 返回对象的最后一帧。

If the recorder object is playing a recording, then the frame is taken from the recording. Otherwise, the frame comes from the Leap Motion Controller itself.

如果记录器对象正在播放记录,那么该帧将从记录中获取。否则将从Leap Motion控制器本身获取。

Controller GetLeapController() 获取Leap控制器

Returns the Leap Controller instance. 返回Leap控制器实例。

float GetRecordingProgress() 获取记录进度

The current frame position divided by the total number of frames in the recording.

记录当前帧的进度比例。[译者注:取&#;范围为 0 ~ 1]

void IgnoreCollisionsWithHands(GameObject to_ignore, bool ignore = true) 忽略手部碰撞

Turns off collisions between the specified GameObject and all hands.

关闭指定游戏对象与手部的碰撞。

Subject to the limitations of Unity Physics.IgnoreCollisions(). See .

参见Unity Physics.IgnoreCollisions()。

bool IsConnected() 是否连接

True, if the Leap Motion hardware is plugged in and this application is connected to the Leap Motion service.

返回&#;为真,表示Leap Motion硬件已插入,且当前应用程序连接到Leap Motion服务。

bool IsEmbedded() 是否嵌入

True, if the active Leap Motion device is embedded in a laptop or keyboard.

返回&#;为真,表示当前启用的Leap Motion设备嵌入在笔记本电脑或键盘中。

void PauseRecording() 暂停记录

Stops playback or recording without resetting the frame counter.

暂停播放或记录。

void PlayRecording() 播放记录

Start getting frames from the LeapRecorder object rather than the Leap service.

从LeapRecorder对象中获取帧,而非Leap服务。

void Record() 录制【VR】Leap Motion 官网文档 HandController(手部控制器)(vrbrations)

Starts saving frames.

开始保存帧。

void ResetRecording() 重设记录

Discards any frames recorded so far.

舍弃之前已录制的帧。

void StopRecording() 停止记录

Stops recording or playback and resets the frame counter to the beginning.

停止录制或播放,并将当前帧设置到初始位置。

Public Members 公共成员

bool destroyHands 是否可以手动销毁手型

If hands are in charge of Destroying themselves, make this false.

如果手型自主销毁,需要将其设置为false。

bool enableRecordPlayback 记录播放有效化

Set true to enable recording.

设置为true 使记录播放有效。

Vector3 handMovementScale 手部移动范围

The scale factors for hand movement.

手部移动的缩放比例。

Set greater than 1 to give the hands a greater range of motion.

该&#;大于1时将放大手部移动范围。

bool isHeadMounted 是否用于头戴设备

Set true if the Leap Motion hardware is mounted on an HMD; otherwise, leave false.

当Leap Motion硬件被用于头戴设备时,设置为true;否则为false。

HandModel leftGraphicsModel 左侧图形模型

The GameObject containing graphics to use for the left hand or both hands if separateLeftRight is false.

左手所使用的图形对象,当separateLeftRight为false时用于双手。

HandModel leftPhysicsModel 左侧物理模型

The GameObject containing colliders to use for the left hand or both hands if separateLeftRight is false.

左手所使用的物理碰撞器对象,当separateLeftRight为false时用于双手。

bool mirrorZAxis 镜像Z轴

Reverses the z axis.

对Z轴方向取反。

bool recorderLoop 记录器循环

Whether to loop the playback.

控制是否循环播放。

float recorderSpeed 记录器速度

Playback speed. 播放速度。

Set to 1.0 for normal speed. 1为正常速度。

TextAsset recordingAsset 记录文件资源

The file to record or playback from.

记录或播放的文件。

HandModel rightGraphicsModel 右侧图形模型

The graphics hand model to use for the right hand.

右手使用的图形手型。

HandModel rightPhysicsModel 右侧物理模型

The physics hand model to use for the right hand.

右手使用物理手型。

bool separateLeftRight 分离左右手

Whether to use a separate model for left and right hands (true); or mirror the same model for both hands (false).

用于控制左右手使用不同模型(为true时)或通过镜像使用相同模型(为false时)。

ToolModel toolModel 工具模型

The GameObject containing both graphics and colliders for tools.

改游戏对象包含工具的图形和碰撞器。

————————————————————————————————

更多参考:

【VR】Leap Motion 官网文档 脚本参考(目录)

(版权声明:本篇为Leap Motion 官网文档译文,版权归Leap Motion 官网所有,图文内容仅供学习使用。)

[置顶] (二十九)unity4.6学习Ugui中文文档-------运行时创建Scroll-lists 孙广东.5.首先要滚动和list形式存储内容。使用ScrollRect组件。就可以滚动了,但是有时候我们不希望,item超过区域还显示:就要使用Mask组件,

unity克隆抛物线型金币的方法 1、准备好我们要克隆的对象:金币publicGameObjectcoin;2、计算出抛物线的函数并按照函数算出克隆的位置:///summary///克隆抛物线型金币的方法////summary///par

Unity中碰撞体和触发器的区别 要产生碰撞必须为游戏对象添加刚体(Rigidbody)和碰撞器,刚体可以让物体在物理影响下运动。碰撞体是物理组件的一类,它要与刚体一起添加到游戏

标签: vrbrations

本文链接地址:https://www.jiuchutong.com/biancheng/377243.html 转载请保留说明!

上一篇:Unity项目中UI同学需知的程序相关要点(unity ulua)

下一篇:[置顶] (二十九)unity4.6学习Ugui中文文档-------运行时创建Scroll-lists(置顶聊天的人怎么不见了)

  • 源泉扣税什么意思
  • 进口货物增值税的组成计税价格是
  • 小规模纳税人30万含专票吗
  • 收到进项发票是什么凭证
  • 其他流动资产对应科目
  • 申报查询里面找不到才申报的个税
  • 固定资产不能抵扣进项税额
  • 资产报废变现收入应开具哪种发票
  • 工程项目增值税税率
  • 价格调节基金费率
  • 企业自产自销的成本怎么核算?
  • 公司没有给员工买社保怎么赔偿
  • 补偿金超过平均工资三倍
  • 进项和销项不符的税务处理
  • 工程的进项税怎么处理
  • 个人劳务法律规定
  • 水利建设基金的缴费基数是什么
  • 专家费怎么做账没发票
  • 普通发票作废税费怎么算
  • 高新技术企业取消资格的程序
  • 以现金收回已核销的不良贷款分录?
  • 鸿蒙系统开发人员选项
  • 新版edge浏览器文字不显示
  • 个税申报的人数比工资表少了怎么办
  • 出口视同内销的账务处理?
  • 电脑怎么纯净启动
  • 销售返点的账务怎么处理
  • php 字符串函数
  • 金融资产终止确认是什么意思
  • 退税报关的流程是什么
  • vue 移动端
  • 银行日记账本月没有发生业务
  • 两只小北极熊
  • 工会筹备金计税依据
  • 提取法定盈余公积会计科目
  • gpio口是什么意思?
  • 微信小程序slot
  • wordpress最新版本
  • css3题目
  • 终于见识到什么叫云横秦岭了
  • js原型模式创建对象的优缺点
  • 增值税进项税抵扣凭证
  • 银行汇票和银行承兑汇票的区别
  • mysql union和join
  • 员工加班打车费进项可以抵扣吗
  • 城建税免征怎么记账
  • 销售费用怎么用
  • 本月发生费用未支付会计处理
  • 核定征收的企业需要汇算清缴吗
  • 固定资产原价和账面价值的区别
  • 研发费用是否包含增值税
  • 收到多收的款会计处理
  • 门面转让费怎么开发票
  • 营改增后营业费用科目还有吗
  • 车辆不在公司名下加油费可以进公司吗
  • 公司日常费用支出表怎么做
  • 公司被私募基金收购有啥影响 裁员
  • 对方发票丢失怎么申报丢失
  • sql server高级应用
  • winxp系统提速
  • mac复制文件路径后怎么粘贴
  • centos6.10修改主机名
  • freebsd版本选择
  • 如何远程重装系统教程
  • windows active directory功能
  • window10用久了都会慢吗
  • 64位windows8系统安装驱动时出现签名错误的解决方法
  • centos7.0安装教程
  • win8怎么禁用更新
  • win10禁止显卡驱动自动安装
  • Win10 PC版 Build 14328上手体验视频评测
  • win8怎么弄出开始菜单键
  • perl sub
  • node.js如何运行
  • python ints
  • unity2d序列帧
  • 建筑业小规模纳税人工程结算增值税
  • 环保税的税率是怎么算的
  • 税务局打印发票的软件是哪个
  • 誊抄什么意思
  • 免责声明:网站部分图片文字素材来源于网络,如有侵权,请及时告知,我们会第一时间删除,谢谢! 邮箱:opceo@qq.com

    鄂ICP备2023003026号

    网站地图: 企业信息 工商信息 财税知识 网络常识 编程技术

    友情链接: 武汉网站建设