Exemple #1
0
 public static bool FVRFireArmAttachment_UpdateSnappingBasedOnDistance(FVRFireArmAttachment __instance)
 {
     if (_easyAttachmentAttaching.Value && __instance.m_hand.OtherHand.CurrentInteractable != null && __instance.m_hand.OtherHand.CurrentInteractable is FVRFireArm)
     {
         FVRFireArm fvrfireArm   = __instance.m_hand.OtherHand.CurrentInteractable as FVRFireArm;
         float      handToMuzzle = Vector3.Distance(__instance.m_hand.OtherHand.transform.position, fvrfireArm.CurrentMuzzle.position) + 0.25f;
         float      distance     = Vector3.Distance(__instance.transform.position, fvrfireArm.transform.position);
         __instance.SetAllCollidersToLayer(false, distance <= handToMuzzle ? "NoCol" : "Default");
     }
     return(true);
 }
Exemple #2
0
 public static bool FVRFireArmAttachment_EndInteraction(FVRFireArmAttachment __instance)
 {
     __instance.SetAllCollidersToLayer(false, "Default");
     return(true);
 }