mirror of
https://github.com/hanetzer/sdraw_mods_cvr.git
synced 2025-09-05 03:19:23 +00:00
Impovement of UI extension
This commit is contained in:
parent
2828de3818
commit
c0e9ee15b3
16 changed files with 439 additions and 426 deletions
|
@ -27,16 +27,23 @@ namespace ml_vei
|
|||
float l_mag = ((!__instance.HasEmoteOverride) ? __instance.Primary2DAxis : __instance.EmoteOverride).magnitude;
|
||||
if(__instance.ViveDirectionPressed && (l_mag >= CVRInputManager.VrViveGestureDeadZone))
|
||||
{
|
||||
if(__instance.Grip > 0.5f)
|
||||
if(Settings.GripTrigger)
|
||||
{
|
||||
__instance.GestureRaw = -1f;
|
||||
__instance.Gesture = -1f;
|
||||
switch(Settings.AxisPriority)
|
||||
{
|
||||
case Settings.PriorityAxis.Grip:
|
||||
__instance.GestureRaw = ((__instance.Grip > 0.5f) ? -1f : __instance.Trigger);
|
||||
break;
|
||||
|
||||
case Settings.PriorityAxis.Trigger:
|
||||
__instance.GestureRaw = (!UnityEngine.Mathf.Approximately(__instance.Trigger, 0f) ? __instance.Trigger : ((__instance.Grip > 0.5f) ? -1f : 0f));
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
__instance.GestureRaw = __instance.Trigger;
|
||||
__instance.Gesture = __instance.Trigger;
|
||||
}
|
||||
__instance.GestureRaw = 0f;
|
||||
|
||||
__instance.Gesture = __instance.GestureRaw;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue