microsoft / Xbox-GDK-Samples

Game development samples published by the Xbox Advanced Technology Group using the Microsoft GDK.
http://aka.ms/gamedevdocs
MIT License
218 stars 32 forks source link

A sample project about using IGameInputDevice::CreateForceFeedbackEffect #27

Closed luqiming666 closed 1 year ago

luqiming666 commented 1 year ago

Is there any sample project for demonstrating the using the following APIs? IGameInputDevice::CreateForceFeedbackEffect IGameInputForceFeedbackEffect::SetState IGameInputForceFeedbackEffect::SetGain IGameInputForceFeedbackEffect::SetParams

If yes, let me know. If not, any plan to make one? Thanks.

BrianPeek commented 1 year ago

The sample in System\SimpleFFBWheel demonstrates some of these APIs. There is a new version of this sample coming with the March GDK release.

luqiming666 commented 1 year ago

Cool.

Then my question would be, are those force feedbacks designed only for racing wheel (and UI navigation devices)? Is it possible for them to be applied to gamepads? I mean those types of force feedback like ramp, sineWave, squareWave, spring, etc. https://learn.microsoft.com/en-us/gaming/gdk/_content/gc/reference/input/gameinput/structs/gameinputforcefeedbackparams

BTW, what does GameInput device with GameInputKindUiNavigation look like? It would be nice if you can show me a picture.

I also found that SimpleFFBWheel doesn't have a Gaming.Desktop.x64 configuration like GamepadVibration. Does it mean it won't run on a Windows PC?

Thank you for your help.

BrianPeek commented 1 year ago

The effects are only for devices which have force-feedback motors, which at the moment are most supported in steering wheels. These will not work for gamepads at all. FFB is supported on both Desktop and Console, however there are a few issues on Desktop which is why we don't have a build for Desktop. This will be fixed in a future release and the sample updated.