mirror of
https://github.com/hanetzer/sdraw_mods_cvr.git
synced 2025-09-05 03:19:23 +00:00
Update to Ultraleap Gemini v5.12
Update to Ultraleap Unity Plugin v6.9.0 Unclamped spreads and curls
This commit is contained in:
parent
176d6530cb
commit
db93926f61
41 changed files with 1001 additions and 2573 deletions
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue