forked from ExtendRealityLtd/VRTK
-
Notifications
You must be signed in to change notification settings - Fork 0
Controller Actions
StoneFox edited this page Jun 6, 2016
·
2 revisions
[VRTK_ControllerActions]
The Controller Actions script provides helper methods to deal with common controller actions. The following public methods are available:
- IsControllerVisible(): returns true is the controller model is visible, returns false if it is not visible.
- ToggleControllerModel(bool on): sets the visibility of the controller model to the given boolean state. If true is passed then the controller model is displayed, if false is passed then the controller model is hidden.
- TriggerHapticPulse(int duration, ushort strength): initiates the controller to begin vibrating for the given tick duration provided in the first parameter at a vibration intensity given as the strength parameter. The max strength that can be provided is 3999, any number higher than that will be capped.
An example of the VRTK_ControllerActions script can be viewed in
the scene SteamVR_Unity_Toolkit/Examples/016_Controller_HapticRumble
which demonstrates the ability to hide a controller model and make
the controller vibrate for a given length of time at a given intensity.
- Home
- Quick Start
- FAQ/Troubleshooting
- Prefabs
-
Scripts
- Controllers
- Pointers
- Movement
- Interactions
- Examples