跳过至主要内容

← 返回:索引页

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) 已被替换为

← 返回索引页