Description
The ControllerPattern
field is a public instance field of type HapticPattern
within the HapticEffect
class. It represents the haptic pattern specifically designed for the controller, allowing developers to define and manipulate the vibration feedback that is applied to the entire controller device.
Usage
To use the ControllerPattern
field, you need to have an instance of the HapticEffect
class. You can then access and modify the ControllerPattern
to customize the haptic feedback for the controller. This can be useful for creating immersive experiences by providing tactile feedback in response to in-game events.
Example
// Example of using the ControllerPattern field
HapticEffect hapticEffect = new HapticEffect();
// Accessing the ControllerPattern field
HapticPattern pattern = hapticEffect.ControllerPattern;
// Modify the pattern as needed
pattern.SetAmplitude(0.5f);
pattern.SetFrequency(1.0f);
// Apply the modified pattern to the controller
hapticEffect.ControllerPattern = pattern;