Update to Ultraleap Gemini v5.12

Update to Ultraleap Unity Plugin v6.9.0
Unclamped spreads and curls
This commit is contained in:
SDraw 2023-07-04 11:51:58 +03:00
parent 176d6530cb
commit db93926f61
No known key found for this signature in database
GPG key ID: BB95B4DAB2BB8BB5
41 changed files with 1001 additions and 2573 deletions

View file

@ -35,38 +35,18 @@ namespace ml_lme
}
}
public static void LeapToUnity(ref Vector3 p_pos, ref Quaternion p_rot, Settings.LeapTrackingMode p_mode)
{
p_pos *= 0.001f;
p_pos.z *= -1f;
p_rot.x *= -1f;
p_rot.y *= -1f;
switch(p_mode)
{
case Settings.LeapTrackingMode.Screentop:
{
p_pos.x *= -1f;
p_pos.y *= -1f;
p_rot = (ms_screentopRotationFix * p_rot);
}
break;
case Settings.LeapTrackingMode.HMD:
{
p_pos.x *= -1f;
Swap(ref p_pos.y, ref p_pos.z);
p_rot = (ms_hmdRotationFix * p_rot);
}
break;
}
}
public static void Swap<T>(ref T lhs, ref T rhs)
{
T temp = lhs;
lhs = rhs;
rhs = temp;
}
public static float InverseLerpUnclamped(float a, float b, float value)
{
if(a != b)
return (value - a) / (b - a);
return 0f;
}
}
}