【问题标题】:Unity3D Leap Motion - Transform a hand to the same position & rotation as anotherUnity3D Leap Motion - 将一只手变换到与另一只手相同的位置和旋转
【发布时间】:2019-07-01 19:04:20
【问题描述】:

我有两个来自两个不同跳跃运动传感器的左手副本,我正在尝试转换一个以匹配另一个的位置和旋转。

我目前正在使用以下代码对其进行可视化:

Hand temp = new Hand().CopyFrom(averaged[key2].LeftHand);
temp.SetTransform(averaged[key1].LeftHand.PalmPosition.ToVector3(),averaged[key1].LeftHand.Rotation.ToQuaternion());

foreach (Finger f in temp.Fingers)
{
  foreach (Bone b in f.bones)
  {
    Debug.DrawLine(b.PrevJoint.ToVector3(),
      b.NextJoint.ToVector3(),Colors.OrangeCrayola);
  }
}

问题在于手的旋转没有按应有的顺序排列。

【问题讨论】:

    标签: c# unity3d quaternions leap-motion


    【解决方案1】:

    在脚本https://github.com/leapmotion/UnityModules/blob/feat-multi-device/Assets/LeapMotion/Core/Scripts/Utils/MultideviceAlignment.cs中找到对齐手

    将其附加到与您的服务提供商脚本之一相同的对象上,并分配 collection 和 solve 键绑定。只要右手都能看到,它将根据右手对齐不同的跳跃。您需要先按收集按钮,然后按解决按钮。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-12-13
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多