ForceFeedbackMotor.MasterGain Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Specifies the percentage by which to reduce the force of all effects on the controller.
public:
property double MasterGain { double get(); void set(double value); };
double MasterGain();
void MasterGain(double value);
public double MasterGain { get; set; }
var double = forceFeedbackMotor.masterGain;
forceFeedbackMotor.masterGain = double;
Public Property MasterGain As Double
Property Value
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;