[SOLVED] Vibration on Xbox 360 and One controllers in Windows 10

What is the correct way to set gamepad vibration in Mongame? I’m developing on Windows 10 and using Xbox 360 and Xbox One controllers? I was hoping it would be as simple as the following, but evidently not!

GamePad.SetVibration(PlayerIndex.One, 1, 1);

This may help?

If someone can explain how to use that, I would appreciate it…

I hadn’t seen this. My game is a standard Windows game, not a UWP. Does creating a UWP cause issues? Can they be distributed on Steam, for example, or just the Windows store? It would cause complications running on Windows 7?

Apparently I can’t post this as it is too similar to what is previously posted. Typing this on the end to fix it.

I think because you accidently posted it in that other thread just now, saw you delete it…

Windows Desktop is fine for Steam, there are threads on this topic, just search for it at the top…

I think the code for input should be the same as it is .NET based so should still function though I cannot confirm this right now…

It’s not. Input is platform specific. UWP has the Windows.Gaming.Input namespace and DirectX uses XInput bindings.

@Pixelnicks What’s the return value of the SetVibration call? Is the gamepad working other than the vibration? And are you using a develop version of MonoGame?

1 Like

That is what I meant :slight_smile:

But he wrote:

Which to me translates to UWP… but he did later ask about Steam and Windows 7 which both mean Desktop…

Someone at the bottom mentioned something relating to MonoGame…

Chanced upon this but it s confusing for me at present so posting it here if it is useful

Will add it to the U-MG-RL thread…

Sorry for not replying - it must have been a driver issue, I changed no code and it now functions as expected :slight_smile:

1 Like

On my win10, I have to update GamePad.SetVibration() each frame. Probably too many games that got stuck with the vibration on.