Skip to content

Commit

Permalink
feat(Controller): add method for getting trigger axis value
Browse files Browse the repository at this point in the history
There is a new method on the Controller Events for getting the
current position of the trigger axis rather than needing to
subscribe to the event which may not always be desireable.
  • Loading branch information
thestonefox committed Jul 31, 2016
1 parent 253f060 commit fab96aa
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Assets/SteamVR_Unity_Toolkit/Scripts/VRTK_ControllerEvents.cs
Original file line number Diff line number Diff line change
Expand Up @@ -297,6 +297,11 @@ public float GetTouchpadAxisAngle()
return CalculateTouchpadAxisAngle(touchpadAxis);
}

public float GetTriggerAxis()
{
return triggerAxis.x;
}

public bool AnyButtonPressed()
{
return (triggerPressed || gripPressed || touchpadPressed || applicationMenuPressed);
Expand Down

0 comments on commit fab96aa

Please sign in to comment.