-api-id | -api-type |
---|---|
T:Windows.Devices.Haptics.SimpleHapticsController |
winrt class |
Provides access to a single haptic input device that can be used to enumerate the haptic waveforms supported by the associated input device and trigger a specific haptic response.
PenDevice.SimpleHapticsController, RawGameController.SimpleHapticsControllers, SpatialInteractionController.SimpleHapticsController, VibrationDevice.SimpleHapticsController, RadialController, Pen interactions and haptic (tactile) feedback, Surface Dial interactions, Haptic Usage Page HID specification
The following fully functional samples demonstrate haptic features across various devices.
See the Pen haptics sample for working examples of the following functionality:
- Get a SimpleHapticsController from pen input: Go from PointerPoint.PointerId to PenDevice to SimpleHapticsController (requires both a haptic-capable pen and a device that supports the pen).
- Check pen haptics capabilities: A SimpleHapticsController exposes properties for pen hardware capabilities, including IsIntensitySupported, IsPlayCountSupported, SupportedFeedback, and so on.
- Start and stop haptic feedback: Use the SendHapticFeedback and StopFeedback methods appropriately.
- Trigger haptic feedback: Feedback for both inking feedback and interaction feedback.
See the RadialController for examples of how to use haptics with RadialController devices such as the Surface Dial.
See the Spatial interaction source sample for an example of how to use haptics with Six Degree of Freedom (6DOF) Controllers on Windows Mixed Reality Desktop.