位置: 编程技术 - 正文

【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万需要交什么税
  • 民营医院一般纳税人帐务处理视频税收风险
  • 资产负债表是根据什么填的
  • 属于原始凭证的有哪些
  • 纳税人的住房租金专项附加扣除标准有
  • 季度申报利润表本月数怎么填
  • 营改增后建筑行业甲供材
  • 我公司给对方公司付款
  • 存货损失
  • 个人房产税延期怎么办理
  • 收到汇算清缴退税账务处理
  • 个人股东转让股权印花税税率
  • 2021 上海房产税
  • 出口退税和企业所得税
  • 印花税漏报了要罚款吗
  • 应交增值税计提表表格
  • 6位开票代码是什么意思
  • 小规模纳税人可以开9%专票吗
  • 福利费用属于什么费用
  • 商誉摊销法的优缺点
  • 企业稀释股份
  • 固定资产入账会计
  • 记账凭证需要哪些人员签章
  • 预付账款收不到发票怎么冲账
  • 技术入股分红怎么计算
  • 哪些金融资产的股票会涨
  • 佣金代扣代缴增值税还有附加税吗
  • deepin 终端命令
  • vue blob下载文件
  • 收到发票已入账,退回怎么做账
  • PHP:pg_num_fields()的用法_PostgreSQL函数
  • 财政部土地出让收支管理办法
  • 计提固定资产折旧怎么做会计科目
  • 生产型出口企业免抵退
  • 赠与房屋再次出售税费
  • 阿尔瓦罗西萨
  • centos7完整版安装
  • 如何在vue项目中运行后端
  • 清算汇缴报表填什么内容
  • 帝国cms如何使用
  • 未分配利润为负数怎么调整
  • 个体工商户生产经营所得税税率表2023
  • 织梦森林官网
  • Python中的关键字
  • 纳税人遗失税务登记证件并按照规定
  • 增值税专用发票和普通发票的区别
  • 金税盘申报流程视频
  • 增值税要计入应收账款吗
  • 普通发票验旧后怎么作废
  • sql的where条件怎么写
  • 交车辆保险的车是什么车
  • 开票金额为什么是负数
  • 跨月的红字发票申请表怎么撤销
  • 合并报表问题
  • 期末需要结账的账户
  • 自产自用的产品增值税怎么算
  • 工程维修款扣多少
  • 投资性房地产处置的账务处理
  • 挂靠工程项目预交税金的会计分录如何做?
  • windows7用户
  • win8怎么设置指纹
  • fedora最新版
  • commserver什么意思
  • 联想系统win8
  • macos 怎么用
  • win10raw预览
  • node.js javascript
  • 安卓版影音播放器哪个好用
  • TypeScript Type Innference(类型判断)
  • dedecms建站操作
  • Unity3D值Input Manager
  • nodejs esmodule
  • javascript网页游戏制作教程
  • 编写python代码
  • js入门基础教程
  • android电池优化设置
  • 黑龙江地方税务总局官网
  • 纳税人总机构和分机构不在同一县怎么办
  • 资源税的税目,税率依照税目税率表执行
  • 比利时个人所得税税率
  • 免责声明:网站部分图片文字素材来源于网络,如有侵权,请及时告知,我们会第一时间删除,谢谢! 邮箱:opceo@qq.com

    鄂ICP备2023003026号

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

    友情链接: 武汉网站建设