← 返回:索引页
2.1.1 变更历史
依赖关系
- haply-将inverse-c.dll更新至 2.1.1 版本(需要Inverse SDK >= 2.1)
- Haply.Inverse.dll已更新至 2.1.1 版本
- 已将com.unity.xr.core-utils添加到 2.3.0 版本中
警告
这会导致与 Unity2022.1.0f1 之前的版本不兼容。 如果遇到兼容性问题,请更新到较新版本。
破坏性变更
- Inverse3 以及 VerseGrip 是,
ConnectionStateChanged作为事件的第一个参数device开始递给……了ConnectionStateChanged(state, prevState)>ConnectionStateChanged(device, state, prevState)ConnectionStateChangedAsync(state, prevState)>ConnectionStateChangedAsync(device, state, prevState)
- DeviceMapper 的
State该属性已更改为只读
新功能
- Inverse3Body组件会将Inverse3 设备上的物体朝向应用到指定的 GameObject 上。
- Inverse3:
- “设备数据(检查器)”中包含已发送至设备的
ControlMode以及最后Force、Position、或Angles将显示。 JointsAngles以及JointsAngularVelocity。Powered表示设备当前是否处于开机状态。PowerSupplyStatusChanged每当电源供应状态发生变化时,都会触发 Unity 事件。Orientation用于获取Inverse3 设备的当前方向。OrientationChangedAsync每当物体方向发生变化时,就会触发该事件。RequestOrientation()将手动请求调整车身朝向。ControlMode用于获取当前的控制模式(CursorForce、CursorPosition、JointsTorques、JointsAngles)。ControlModeChanged每当控制模式发生变化时,Unity 事件就会触发。ForceOutput、PositionOutput、JointsTorqueOutput、JointsAnglesOutput用于获取当前输出。Release()通过发送 null 信号来重置设备控制(TryResetForce()(代替)。CoordinateConverter通过预设文件或直接输入数值来定义坐标变换设置。ErrorEvent当已映射的设备上添加了 ClientConnection 的错误事件时(在主线程上),该事件会被触发
- “设备数据(检查器)”中包含已发送至设备的
- VerseGrip:
CoordinateConverter通过预设文件或直接输入数值来定义坐标变换设置。ErrorEvent当已映射的设备上添加了 ClientConnection 的错误事件时(在主线程上),该事件会被触发
- 设备映射器:
- 映射运行时连接的设备。
- 针对每个Inverse3 设备,获取Inverse3 的电源(Power Supply)和机身方向(Body Orientation)。
DeviceInfoPollingMode该模式是Manual、Once(默认),或ContinuousですdevicesInfoPollDelay当要求车身朝向时,这是安全的最小值1sec,否则0.5sec将被设置为。- 仅在组件启用时才会进行初始化。
- 已过滤设备的获取器:
GetInverse3Devices(handedness)用于获取按指定惯用手过滤后的Inverse3 设备。GetVerseGripDevices(handedness)用于获取与指定惯用手匹配的、与Inverse3 设备关联的 VerseGrip设备。GetInverse3(handedness)将获取第一个与指定惯用手匹配的Inverse3 设备。GetInverse3(verseGrip)用于获取与指定 VerseGrip 设备关联的Inverse3 设备。GetVerseGrip(inverse3)用于获取与指定的Inverse3 设备关联的VerseGrip设备。
- 已向 VerseGripCursor 和 Inverse3Body 组件添加了OrientationSettings。
VerseGrip.Orientation是VerseGrip.LocalRotation将其替换为。- Inverse3 用于缓存的显式 逆 3D数据 类型:
- 已缓存的状态属性:
CursorPosition、JointsAngles、JointsAngularVelocity、Orientation、GravityCompensation、StatusPowerSupply、ConfigTorqueScaling - 缓存的控制输出
属性:
ControlMode、CursorForceOutput、CursorPositionOutput、JointsTorqueOutput、JointsAnglesOutput。 coordinateConverter用于在指定的坐标系中对接收数据和发送数据进行转换。- 缓存会订阅客户端,并自动更新。
- 在更新缓存时触发事件。
- 已缓存的状态属性:
- 3 个 float 成员
j0、j1、j2具有显式的Joint3结构体(JointsSetTorque以及JointsSetAngles(用于)。 - VerseGrip 缓存的显式 VerseGripData 类型:
- 已缓存的状态属性:
Orientation、IsAttached、ButtonCount。 - 缓存按钮的状态。
- 缓存会订阅客户端,并自动更新。
coordinateConverter用于将接收到的数据转换为指定的坐标系。- 在更新缓存时触发事件。
- 已缓存的状态属性:
- 坐标转换器(
UnityConvert(替代方案):分别定义将设备坐标系 转换为 Unity 坐标系的方法:Inverse3CoordinateConverter将光标坐标与实体方向进行转换。VerseGripCoordinateConverter将转换 VerseGrip 的方向。Vector3Settings以及QuaternionSettings结构体用于保存坐标系转换设置。- 从“组件”或“资源”菜单中,为Inverse3 和VerseGrip创建默认坐标变换预设。
- Inverse3(手臂向前姿势)转换:将手臂朝向用户,适用于 LED 图标位于侧面的设备的设置转换。
- Inverse3(图标向前姿势)转换:将 LED 图标朝向用户,且手臂位于 侧面的设备所用的设置转换。
- VerseGrip(默认)转换:适用于屏幕朝前且用户输入按钮位于顶部的设备的转换。
- 客户端连接 是在打开设备时
FirmwareVersion、GravityCompensation、TorqueScaling获取。 - 连接监控器 是
GravityCompensation、TorqueScaling、PowerSupply显示。
错误修复
Inverse3.DeviceStateChanged但JointsSetTorque以及JointsSetAngles修复了可能引发火灾的问题- 已修复,现在断开连接后设备会自动重新连接
- 已修改为在构建结束时清理客户端的轮询线程
- 修复了错误并提高了稳定性
- 修复场景卸载/加载后的设备映射
不建议
ClientConnection.Configuration.HapticFrequencyHz是HapticPollFrequency已被替换为ClientConnection.Configuration.PollDelayNs是HapticPollDelayNs已被替换为DeviceBehaviour.ConnectionStateChangedAsync该功能计划在下一个主要版本中移除Inverse3.Position是Inverse3.CursorPosition已被替换为Inverse3.LocalPosition是Inverse3.CursorLocalPosition已被替换为Inverse3.TryResetForce()是Release()已被替换为VerseGrip.LocalRotation是VerseGrip.Orientation已被替换为JointsSetTorque(Vector3)是JointsSetTorques(Joint3)已被替换为JointsSetTorque(float, float, float)是JointsSetTorques(float, float, float)已被替换为JointsSetAngles(Vector3)是JointsSetAngles(Joint3)已被替换为
← 返回索引页