位置: 编程技术 - 正文

【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(置顶聊天的人怎么不见了)

  • 自然人报税系统怎么进入单位报税系统
  • 教育附加费税率怎么算
  • 自来水税率是9%还是3%
  • 已报关的货物可以改单价价吗
  • 银行的电子退库是什么,怎么做账
  • 客户能把货款打给个人吗
  • 车间管理人员工资总额占车间工资总额的10%
  • 未到期责任准备计入什么科目
  • 个体工商户个人所得税怎么计算
  • 税法相关问题
  • 固定资产处理怎么入账
  • 公允价值变动增加在借方还是贷方
  • 企业购买商品房限购吗
  • 企业开办费摊销期限的税法规定
  • 补提的增值税应该记在哪里
  • 腾讯管家游戏加速怎么开
  • linux怎么增加磁盘空间
  • 在linux2.4.0版本中
  • macwifi连接频繁断开
  • 如何解决windows7台试电脑蓝屏问题
  • win7系统怎么重装win10系统
  • jdk1.8环境变量设置
  • 租赁费和场地租赁费区别
  • 固定资产折旧折完了
  • 路由器重启后电视放不出来咋办
  • 黄石国家公园的英语怎么读
  • uniapp cover-view
  • 收到投标保证金利息如何账务处理
  • 长期应付款的摊余成本怎么计算
  • 马耳他共和国瓦莱塔福利
  • php常见设计模式和用途
  • php运用的技术php开发有哪些实用的技术
  • 一般纳税人简易征收3%可以开专票吗
  • 车子的保险费
  • html与js之间如何配合
  • js获取当前日期的函数
  • 缴纳社保的时候工资填写多少
  • linux rc.d init.d
  • 销售费用的主要类型有哪些
  • 跨年专票红冲步骤
  • 根据银行回单做流水账单
  • 开办费的主要账户是什么
  • 增值税预征税率是多少
  • 购买保健食品
  • 固定资产处置是当月还是下月
  • 投标报名费如何缴纳
  • 企业所得税的计提
  • 上年计提费用多了,要怎样调
  • 非正常损失进项税额转出怎么计算
  • 什么费用可以列入研发费用
  • 企业职工福利费支出包括哪些内容
  • 车间劳务费计入什么费用
  • 现金折扣定价案例
  • 购入原材料结转成本怎么算
  • 工会为员工购买水杯
  • 公司的三证合一是什么
  • 解析关于sql语句的实现
  • win8.1关机没反应
  • freebsd与linux
  • windows10 rs2
  • 苹果mac有啥用
  • windows createfile
  • w10开发者模式
  • Deepin 2014.2正式版下载 和安装教程
  • xshell使用ssh命令远程连接linux
  • win8.1 微软拼音设置
  • mtask.exe - mtask是什么进程 有什么用
  • cocos2d-x 3.4 windows 环境配置
  • CalledFromWrongThreadException: Only the original thread that created a view
  • python用于读取文本文件内容的方法
  • 服务器总是自动关机
  • find 批处理
  • js 显示当前时间
  • JavaScript中的this
  • jquery.browser
  • 如何登录黑龙江全省事
  • 吉林网上报税网址
  • 税务代办需要什么资料
  • 税务局与税务所工资哪个高
  • 福州灵活就业社保缴费2024年多少钱
  • 免责声明:网站部分图片文字素材来源于网络,如有侵权,请及时告知,我们会第一时间删除,谢谢! 邮箱:opceo@qq.com

    鄂ICP备2023003026号

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

    友情链接: 武汉网站建设