Skip to content

Commit

Permalink
fix(Interaction): remove valid controller check from secondary action
Browse files Browse the repository at this point in the history
The Secondary Grab Action was checking to see if the controller was a
valid grab controller on the interactable object.

This did not make sense as if the right controller was a valid grab
controller then only the right controller could pick up the object
but then the left controller could never initiate a secondary grab
action as the right controller was the only one denoted as being
valid to initiate a grab action.
  • Loading branch information
thestonefox committed Aug 27, 2017
1 parent d227047 commit d8f4b0f
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions Assets/VRTK/Scripts/Interactions/VRTK_InteractGrab.cs
Original file line number Diff line number Diff line change
Expand Up @@ -446,14 +446,6 @@ protected virtual void InitPrimaryGrab(VRTK_InteractableObject currentGrabbedObj

protected virtual void InitSecondaryGrab(VRTK_InteractableObject currentGrabbedObject)
{
if (!currentGrabbedObject.IsValidInteractableController(gameObject, currentGrabbedObject.allowedGrabControllers))
{
grabbedObject = null;
influencingGrabbedObject = false;
currentGrabbedObject.Ungrabbed(this);
return;
}

influencingGrabbedObject = true;
currentGrabbedObject.Grabbed(this);
}
Expand Down

0 comments on commit d8f4b0f

Please sign in to comment.