-
Notifications
You must be signed in to change notification settings - Fork 58
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Games don't return any force feedback #51
Comments
I tried this code in Beamng.Drive and ETS2 |
I tried assetto corsa and it works |
Hello, I would like to ask, have you ever encountered a situation where the force feedback done by this library will cause the game to drop frames in the game? Or freeze and dodge? I also got a similar issue to you, I seem to have solved the problem of force feedback acquisition, but it causes my game to drop frames very badly! Here's what I set up in my code: I feel like the device may be getting data into the game, causing the game to drop frames, but I don't know how to fix it yet, so I want to know if your project is complete? Can you give me some help? |
Yes, i also have this problem |
Indeed, the situation is caused by insufficient computational capacity of the chip, and it's also related to whether the game employs a synchronous mechanism for sending force feedback data. The v0.9.0 version performed well in 'Project Cars 2', but significant frame drops occurred in both 'Horizon 4' and 'Horizon 5'. I invested effort into pinpointing and resolving this issue, and thus, I recommend you try building your project with v1.0.0. Enjoy it! |
Hello
I made a program based on your lib
When i am using WheelCheck arduino gets information about forces and returns them to the serial port
However, when i try to get forces in games, it doesn't see it. it returns 0
Here is my code
`#include "Joystick.h"
Joystick_ Joystick(JOYSTICK_DEFAULT_REPORT_ID,JOYSTICK_TYPE_JOYSTICK,
0, 0,
true, false, false,
false, false, false,
false, false,false, false, false);
Gains mygains[1];
EffectParams myeffectparams[1];
int32_t forces[1];
unsigned long t,lt,dt,lastT; //time part
int x, lx, deltaX, dx,ldx, dx2; //differential part
void setup() {
mygains[0].totalGain = 50; //setting gains
mygains[0].rampGain = 50;
mygains[0].squareGain = 50;
mygains[0].sineGain = 50;
mygains[0].triangleGain = 50;
mygains[0].sawtoothdownGain = 50;
mygains[0].sawtoothupGain = 50;
mygains[0].springGain = 80;
mygains[0].damperGain = 50;
mygains[0].inertiaGain = 50;
mygains[0].frictionGain = 50;
mygains[0].customGain = 50;
Joystick.setGains(mygains);
Joystick.begin();
Joystick.setXAxisRange(-512, 512);
Serial.begin(500000);
lt=millis();
}
void loop() {
lt = t; //time part
t = millis();
dt = t - lt;
if(millis()-lastT>0){
lastT=millis();
lx=x; //last x
ldx=dx; // last x velocity
x=analogRead(A0)-512; //x
deltaX=x-lx;// delta x
dx=deltaX/dt;//x velocity
dx2=(dx-ldx)/dt;//x acceleration
myeffectparams[0].springMaxPosition = 512;
myeffectparams[0].springPosition = x;
myeffectparams[0].damperMaxVelocity = 100;
myeffectparams[0].damperVelocity = dx;
myeffectparams[0].inertiaMaxAcceleration = 5;
myeffectparams[0].inertiaAcceleration = dx2;
myeffectparams[0].frictionMaxPositionChange = 10;
myeffectparams[0].frictionPositionChange = deltaX;
Joystick.setXAxis(x);
Joystick.sendState();
Joystick.setEffectParams(myeffectparams);
Joystick.getForce(forces);
Serial.print(x);
Serial.print(" ");
Serial.println(forces[0]);
}
}`
I think games just don't recognize it as a force feedback device, that can use effects(like spring, friction, ect) because while Wheel check is working, Force Test says "Your joystick may not support this effect" for each effect
Do you know how to fix that?
Thanks in advance
The text was updated successfully, but these errors were encountered: