ForceFeedbackMotor ForceFeedbackMotor ForceFeedbackMotor ForceFeedbackMotor Class

Definition

Encapsulates the force feedback hardware for a given input device.

public : sealed class ForceFeedbackMotor : IForceFeedbackMotorpublic sealed class ForceFeedbackMotor : IForceFeedbackMotorPublic NotInheritable Class ForceFeedbackMotor Implements IForceFeedbackMotor// You can use this class in JavaScript.
Attributes
Windows 10 requirements
Device family
Windows 10 Anniversary Edition (introduced v10.0.14393.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v3)

Properties

AreEffectsPaused AreEffectsPaused AreEffectsPaused AreEffectsPaused

Boolean indicating whether force feedback effects are paused.

public : PlatForm::Boolean AreEffectsPaused { get; }public bool AreEffectsPaused { get; }Public ReadOnly Property AreEffectsPaused As bool// You can use this property in JavaScript.
Value
PlatForm::Boolean bool bool bool

Boolean indicating whether force feedback effects are paused.

IsEnabled IsEnabled IsEnabled IsEnabled

Boolean indicating whether the force feedback motor is enabled.

public : PlatForm::Boolean IsEnabled { get; }public bool IsEnabled { get; }Public ReadOnly Property IsEnabled As bool// You can use this property in JavaScript.
Value
PlatForm::Boolean bool bool bool

Boolean indicating whether the force feedback motor is enabled.

MasterGain MasterGain MasterGain MasterGain

Specifies the percentage by which to reduce the force of all effects on the controller.

public : double MasterGain { get; set; }public double MasterGain { get; set; }Public ReadWrite Property MasterGain As double// You can use this property in JavaScript.
Value
double double double double

Specifies the percentage by which to reduce the force of all effects on the controller.

Examples


// The Contoso and Fabrikam motors have a very high maximum
// torque output, so tone down all force feedback effects
// played on those devices so they don't overwhelm the user
if (motor->HardwareModelId == ContosoWheelMotorId)
{
    // Attentuate effects by 20% for the Contoso motor
    motor->MasterGain = 0.2;
}
else if (motor->HardwareModelId == FabrikamWheelMotorId)
{
    // Attenuate effects by 35% for the Fabrikam motor
    motor->MasterGain = 0.35;
}

// Make sure the motor is enabled
motor->IsMotorEnabled = true;

SupportedAxes SupportedAxes SupportedAxes SupportedAxes

The axes supported by the force feedback motor.

public : ForceFeedbackEffectAxes SupportedAxes { get; }public ForceFeedbackEffectAxes SupportedAxes { get; }Public ReadOnly Property SupportedAxes As ForceFeedbackEffectAxes// You can use this property in JavaScript.

Methods

LoadEffectAsync(IForceFeedbackEffect) LoadEffectAsync(IForceFeedbackEffect) LoadEffectAsync(IForceFeedbackEffect) LoadEffectAsync(IForceFeedbackEffect)

Attempts to asynchronously load a feedback effect to the device's internal memory.

public : IAsyncOperation<ForceFeedbackLoadEffectResult> LoadEffectAsync(IForceFeedbackEffect effect)public IAsyncOperation<ForceFeedbackLoadEffectResult> LoadEffectAsync(IForceFeedbackEffect effect)Public Function LoadEffectAsync(effect As IForceFeedbackEffect) As IAsyncOperation( Of ForceFeedbackLoadEffectResult )// You can use this method in JavaScript.
Parameters
Returns

PauseAllEffects() PauseAllEffects() PauseAllEffects() PauseAllEffects()

Pauses all force feedback effects being executed.

public : void PauseAllEffects()public void PauseAllEffects()Public Function PauseAllEffects() As void// You can use this method in JavaScript.

ResumeAllEffects() ResumeAllEffects() ResumeAllEffects() ResumeAllEffects()

Resumes all force feedback effects being executed.

public : void ResumeAllEffects()public void ResumeAllEffects()Public Function ResumeAllEffects() As void// You can use this method in JavaScript.

StopAllEffects() StopAllEffects() StopAllEffects() StopAllEffects()

Stops all force feedback effects.

public : void StopAllEffects()public void StopAllEffects()Public Function StopAllEffects() As void// You can use this method in JavaScript.

TryDisableAsync() TryDisableAsync() TryDisableAsync() TryDisableAsync()

Attempts to asynchronously disable the force feedback motor.

public : IAsyncOperation<PlatForm::Boolean> TryDisableAsync()public IAsyncOperation<bool> TryDisableAsync()Public Function TryDisableAsync() As IAsyncOperation( Of bool )// You can use this method in JavaScript.
Returns

Returns the result of the asynchronous operation.

TryEnableAsync() TryEnableAsync() TryEnableAsync() TryEnableAsync()

Try to asynchronously enable the force feedback motor of the device.

public : IAsyncOperation<PlatForm::Boolean> TryEnableAsync()public IAsyncOperation<bool> TryEnableAsync()Public Function TryEnableAsync() As IAsyncOperation( Of bool )// You can use this method in JavaScript.
Returns

Returns the result of the asynchronous operation.

TryResetAsync() TryResetAsync() TryResetAsync() TryResetAsync()

Attempts to asynchronously reset the device back to its initial state.

public : IAsyncOperation<PlatForm::Boolean> TryResetAsync()public IAsyncOperation<bool> TryResetAsync()Public Function TryResetAsync() As IAsyncOperation( Of bool )// You can use this method in JavaScript.
Returns

Returns the result of the asynchronous operation.

TryUnloadEffectAsync(IForceFeedbackEffect) TryUnloadEffectAsync(IForceFeedbackEffect) TryUnloadEffectAsync(IForceFeedbackEffect) TryUnloadEffectAsync(IForceFeedbackEffect)

Attempts to asynchronously unload a feedback effect from the device's internal memory.

public : IAsyncOperation<PlatForm::Boolean> TryUnloadEffectAsync(IForceFeedbackEffect effect)public IAsyncOperation<bool> TryUnloadEffectAsync(IForceFeedbackEffect effect)Public Function TryUnloadEffectAsync(effect As IForceFeedbackEffect) As IAsyncOperation( Of bool )// You can use this method in JavaScript.
Parameters
Returns

Returns the result of the asynchronous operation.