GameControllerModule.RumbleOptions
ClassOptions for a haptic feedback (rumble) request.
- Snapchat: not supported
- SPECS: fully supported
- Camera Kit Web: not supported
- Camera Kit Mobile: not supported
- SnapchatNot supported — Available on SPECS only
- SPECSFully supported
- Experimental API; it may change or be removed.
- Camera Kit WebNot supported — Available on SPECS only
- Camera Kit MobileNot supported — Available on SPECS only
Since Lens Scripting v373Experimental
Options for a haptic feedback (rumble) request. Uses a dual-motor model: a heavy low-frequency motor and a light high-frequency motor.
Index
Properties
Methods
Example
//@input Asset.GameControllerModule gameControllerModule
var provider = script.gameControllerModule.createController();
provider.onButtonEvent.add(function(event) {
var options = new GameControllerModule.RumbleOptions();
options.controllerId = event.controllerId;
options.lowFrequencyIntensity = 0.5;
options.highFrequencyIntensity = 0.3;
options.durationSec = 0.2;
provider.rumble(options);
});
Extends
Constructors
Constructor
new RumbleOptions():
RumbleOptions
Experimental
Returns
RumbleOptions
Overrides
ScriptObject.constructor
Properties
controllerId
controllerId:
number
ExperimentalSPECS
Unique identifier of the target controller.
Since
Lens Scripting Version 373
Default Value
0
@experimental
@snapOS
durationSec
durationSec:
number
ExperimentalSPECS
Duration of the rumble effect in seconds.
Since
Lens Scripting Version 373
Default Value
0.5
@experimental
@snapOS
highFrequencyIntensity
highFrequencyIntensity:
number
ExperimentalSPECS
Strength of the light/fast rumble motor, from 0.0 (off) to 1.0 (maximum).
Since
Lens Scripting Version 373
Default Value
0
@experimental
@snapOS
lowFrequencyIntensity
lowFrequencyIntensity:
number
ExperimentalSPECS
Strength of the heavy/slow rumble motor, from 0.0 (off) to 1.0 (maximum).
Since
Lens Scripting Version 373
Default Value
0
@experimental
@snapOS
Methods
getTypeName()
staticgetTypeName():TypeName<RumbleOptions>
ExperimentalSPECS
Returns the fully-qualified JavaScript type name for this class (for example, "Component.Camera"). This is a static accessor (no instance required) and returns the same value as the instance getTypeName().
Returns
TypeName<RumbleOptions>
Since
Lens Scripting Version 373
Overrides
getTypeName()
getTypeName():
string
Experimental
Returns the name of this object's type.
Returns
string
Inherited from
isOfType()
isOfType(
type):boolean
Experimental
Returns true if the object matches or derives from the passed in type.
Parameters
| Parameter | Type |
|---|---|
type | string |
Returns
boolean
Inherited from
isSame()
isSame(
other):boolean
Experimental
Returns true if this object is the same as other. Useful for checking if two references point to the same thing.
Parameters
| Parameter | Type |
|---|---|
other | ScriptObject |
Returns
boolean