Click or drag to resize

InputStartJoyVibration Method

Starts to vibrate the joypad. Joypads usually come with two rumble motors, a strong and a weak one. weak_magnitude is the strength of the weak motor (between 0 and 1) and strong_magnitude is the strength of the strong motor (between 0 and 1). duration is the duration of the effect in seconds (a duration of 0 will try to play the vibration indefinitely).

Note: Not every hardware is compatible with long effect durations; it is recommended to restart an effect if it has to be played for more than a few seconds.

Namespace:  Godot
Assembly:  GodotSharp (in GodotSharp.dll) Version: 1.0.0
Syntax
C#
public static void StartJoyVibration(
	int device,
	float weakMagnitude,
	float strongMagnitude,
	float duration = 0f
)

Parameters

device
Type: SystemInt32

[Missing <param name="device"/> documentation for "M:Godot.Input.StartJoyVibration(System.Int32,System.Single,System.Single,System.Single)"]

weakMagnitude
Type: SystemSingle

[Missing <param name="weakMagnitude"/> documentation for "M:Godot.Input.StartJoyVibration(System.Int32,System.Single,System.Single,System.Single)"]

strongMagnitude
Type: SystemSingle

[Missing <param name="strongMagnitude"/> documentation for "M:Godot.Input.StartJoyVibration(System.Int32,System.Single,System.Single,System.Single)"]

duration (Optional)
Type: SystemSingle

[Missing <param name="duration"/> documentation for "M:Godot.Input.StartJoyVibration(System.Int32,System.Single,System.Single,System.Single)"]

See Also