Fine tune FFB and rumble
This commit is contained in:
parent
19243c1bad
commit
51e6cd2690
@ -22,8 +22,8 @@ MaxForce=100
|
|||||||
DeviceGUID=
|
DeviceGUID=
|
||||||
;Set to 1 if you want to enable rumble, else 0.
|
;Set to 1 if you want to enable rumble, else 0.
|
||||||
EnableRumble=1
|
EnableRumble=1
|
||||||
; Set to 1 to generate log.txt, else 0. Logs will be appended and not cleared.
|
|
||||||
ReverseRumble=0
|
ReverseRumble=0
|
||||||
|
; Set to 1 to generate log.txt, else 0. Logs will be appended and not cleared.
|
||||||
Logging=0
|
Logging=0
|
||||||
; When a command is set that contradicts a prior command, clear the prior command. Probably should stay as 1.
|
; When a command is set that contradicts a prior command, clear the prior command. Probably should stay as 1.
|
||||||
ResetFeedback=1
|
ResetFeedback=1
|
||||||
@ -256,10 +256,10 @@ AlternativeMaxForceLeft=-100
|
|||||||
AlternativeMinForceRight=0
|
AlternativeMinForceRight=0
|
||||||
AlternativeMaxForceRight=100
|
AlternativeMaxForceRight=100
|
||||||
SpringStrength=100
|
SpringStrength=100
|
||||||
FrictionStrength=20
|
FrictionStrength=0
|
||||||
CollisionsStrength=30
|
CollisionsStrength=100
|
||||||
TiresSlipStrength=100
|
TiresSlipStrength=100
|
||||||
HighhSpeedVibrationsStrength=50
|
HighhSpeedVibrationsStrength=100
|
||||||
LimitBetweenHighSpeedVibrationsAndTiresSlip=75
|
LimitBetweenHighSpeedVibrationsAndTiresSlip=75
|
||||||
|
|
||||||
[Mame 0199 32bit]
|
[Mame 0199 32bit]
|
||||||
|
@ -52,23 +52,19 @@ void WMMT5::FFBLoop(EffectConstants *constants, Helpers *helpers, EffectTriggers
|
|||||||
{
|
{
|
||||||
helpers->log("collision on the left");
|
helpers->log("collision on the left");
|
||||||
double percentForce = (1.0 * collisions) * CollisionsStrengthWMMT5 / 100.0;
|
double percentForce = (1.0 * collisions) * CollisionsStrengthWMMT5 / 100.0;
|
||||||
double percentLength = (250);
|
|
||||||
// direction from right => makes wheel turn left
|
|
||||||
triggers->LeftRight(percentForce, 0, percentLength);
|
|
||||||
// triggers->Constant(constants->DIRECTION_FROM_RIGHT, percentForce);
|
|
||||||
triggers->Sine(100, 120, percentForce);
|
triggers->Sine(100, 120, percentForce);
|
||||||
|
|
||||||
|
double percentLength = (150);
|
||||||
|
triggers->LeftRight(0, percentForce, percentLength);
|
||||||
}
|
}
|
||||||
else if (0 > collisions)
|
else if (0 > collisions)
|
||||||
{
|
{
|
||||||
helpers->log("collision on the right");
|
helpers->log("collision on the right");
|
||||||
double percentForce = (-1.0 * collisions) * CollisionsStrengthWMMT5 / 100.0;
|
double percentForce = (1.0 * collisions) * CollisionsStrengthWMMT5 / 100.0;
|
||||||
double percentLength = (250);
|
|
||||||
// direction from left => makes wheel turn right
|
|
||||||
triggers->LeftRight(0, percentForce, percentLength);
|
|
||||||
// triggers->Constant(constants->DIRECTION_FROM_LEFT, percentForce);
|
|
||||||
|
|
||||||
percentForce = (1.0 * collisions) * CollisionsStrengthWMMT5 / 100.0;
|
|
||||||
triggers->Sine(100, 120, percentForce);
|
triggers->Sine(100, 120, percentForce);
|
||||||
|
|
||||||
|
double percentLength = (150);
|
||||||
|
triggers->LeftRight(0, -1.0 * percentForce, percentLength);
|
||||||
}
|
}
|
||||||
if (0 < tiresSlip)
|
if (0 < tiresSlip)
|
||||||
{
|
{
|
||||||
@ -76,6 +72,13 @@ void WMMT5::FFBLoop(EffectConstants *constants, Helpers *helpers, EffectTriggers
|
|||||||
bool highSpeedVibrations = (1.0 * tiresSlip) < (LimitBetweenHighSpeedVibrationsAndTiresSlipWMMT5 / 1000.0);
|
bool highSpeedVibrations = (1.0 * tiresSlip) < (LimitBetweenHighSpeedVibrationsAndTiresSlipWMMT5 / 1000.0);
|
||||||
double percentForce = (-1.0 * tiresSlip) * (highSpeedVibrations ? HighhSpeedVibrationsStrengthWMMT5 : TiresSlipStrengthWMMT5) / 100.0;
|
double percentForce = (-1.0 * tiresSlip) * (highSpeedVibrations ? HighhSpeedVibrationsStrengthWMMT5 : TiresSlipStrengthWMMT5) / 100.0;
|
||||||
triggers->Sine(highSpeedVibrations ? 100 : 120, 120, percentForce);
|
triggers->Sine(highSpeedVibrations ? 100 : 120, 120, percentForce);
|
||||||
|
|
||||||
|
if (0 == CollisionsStrengthWMMT5 || (0.001 > collisions && -0.001 < collisions))
|
||||||
|
{
|
||||||
|
percentForce *= -1.0;
|
||||||
|
double percentLength = (150);
|
||||||
|
triggers->LeftRight(highSpeedVibrations ? percentForce : 0, highSpeedVibrations ? 0 : percentForce, percentLength);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else if (0 > tiresSlip)
|
else if (0 > tiresSlip)
|
||||||
{
|
{
|
||||||
@ -83,5 +86,11 @@ void WMMT5::FFBLoop(EffectConstants *constants, Helpers *helpers, EffectTriggers
|
|||||||
bool highSpeedVibrations = (-1.0 * tiresSlip) < (LimitBetweenHighSpeedVibrationsAndTiresSlipWMMT5 / 1000.0);
|
bool highSpeedVibrations = (-1.0 * tiresSlip) < (LimitBetweenHighSpeedVibrationsAndTiresSlipWMMT5 / 1000.0);
|
||||||
double percentForce = (-1.0 * tiresSlip) * (highSpeedVibrations ? HighhSpeedVibrationsStrengthWMMT5 : TiresSlipStrengthWMMT5) / 100.0;
|
double percentForce = (-1.0 * tiresSlip) * (highSpeedVibrations ? HighhSpeedVibrationsStrengthWMMT5 : TiresSlipStrengthWMMT5) / 100.0;
|
||||||
triggers->Sine(highSpeedVibrations ? 100 : 120, 120, percentForce);
|
triggers->Sine(highSpeedVibrations ? 100 : 120, 120, percentForce);
|
||||||
|
|
||||||
|
if (0 == CollisionsStrengthWMMT5 || (0.001 > collisions && -0.001 < collisions))
|
||||||
|
{
|
||||||
|
double percentLength = (150);
|
||||||
|
triggers->LeftRight(highSpeedVibrations ? percentForce : 0, highSpeedVibrations ? 0 : percentForce, percentLength);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user