# GameControlPlus - Controller Vibration?

**URL:** <https://discourse.processing.org/t/gamecontrolplus-controller-vibration/5902>\
**Category:** Libraries\
**Created:** [November 24, 2018, 8:39pm UTC](https://discourse.processing.org/t/gamecontrolplus-controller-vibration/5902 "2018-11-24T20:39:14Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![TechnicJelle](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/technicjelle/32/15033_2.png) [@TechnicJelle](https://discourse.processing.org/u/TechnicJelle)\
**Post date:** [November 24, 2018, 8:39pm UTC](https://discourse.processing.org/t/gamecontrolplus-controller-vibration/5902/1 "2018-11-24T20:39:14Z")

</div>

@quark  
Hello,  
Is it possible to vibrate the controller using GCP?  
I’ve browsed the interweb quite a bit, but I couldn’t really find anything.  
I did check if my controller even supports vibration, so I downloaded [Controller Vibration Tester (CVT)](https://awesomefriends56.webs.com/CVT_Changes.htm), which demonstrated that it indeed does work.

Thanks in advance! 😃

---

<div class="post-metadata">

**Author:** ![quark](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/quark/32/26_2.png) [@quark](https://discourse.processing.org/u/quark)\
**Post date:** [November 25, 2018, 9:07am UTC](https://discourse.processing.org/t/gamecontrolplus-controller-vibration/5902/2 "2018-11-25T09:07:38Z")

</div>

> [@TechnicJelle](#):
>
> Is it possible to vibrate the controller using GCP?

Not to my knowledge. 😞

---

<div class="post-metadata">

**Author:** ![TechnicJelle](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/technicjelle/32/15033_2.png) [@TechnicJelle](https://discourse.processing.org/u/TechnicJelle)\
**Post date:** [November 25, 2018, 10:02am UTC](https://discourse.processing.org/t/gamecontrolplus-controller-vibration/5902/3 "2018-11-25T10:02:22Z")

</div>

Do you know of any other way of doing this?

---

<div class="post-metadata">

**Author:** ![quark](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/quark/32/26_2.png) [@quark](https://discourse.processing.org/u/quark)\
**Post date:** [November 25, 2018, 10:45am UTC](https://discourse.processing.org/t/gamecontrolplus-controller-vibration/5902/4 "2018-11-25T10:45:15Z")

</div>

> [@TechnicJelle](#):
>
> Do you know of any other way of doing this?

No, sorry. 😞

---

<div class="post-metadata">

**Author:** ![Whahahahaha](https://avatars.discourse-cdn.com/v4/letter/w/3be4f8/32.png) [@Whahahahaha](https://discourse.processing.org/u/Whahahahaha)\
**Post date:** [November 26, 2018, 10:52am UTC](https://discourse.processing.org/t/gamecontrolplus-controller-vibration/5902/5 "2018-11-26T10:52:39Z")

</div>

@TechnicJelle and @quark it is possible, but I tried it with a wired Xbox one controller and a Dualshock 4, only the dualshock worked. If the controller.getNumberOfRumblers() returns a value other than 0 it is possible.

---

<div class="post-metadata">

**Author:** ![Whahahahaha](https://avatars.discourse-cdn.com/v4/letter/w/3be4f8/32.png) [@Whahahahaha](https://discourse.processing.org/u/Whahahahaha)\
**Post date:** [November 26, 2018, 10:58am UTC](https://discourse.processing.org/t/gamecontrolplus-controller-vibration/5902/6 "2018-11-26T10:58:52Z")

</div>

to make it clearer:

```auto

import net.java.games.input.*;
import org.gamecontrolplus.*;
import org.gamecontrolplus.gui.*;

ControlIO control;
ControlDevice controller;
void setup(){
 size(480, 480);
  control = ControlIO.getInstance(this);
  controller = control.getMatchedDevice("DS4");
}

void draw(){

  float rt = map(controller.getSlider("RT").getValue(), -1, 1, 0, 4); 
  int nRumble = controller.getNumberOfRumblers();
  controller.rumble(rt,0);
  
}

```

---

<div class="post-metadata">

**Author:** ![TechnicJelle](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/technicjelle/32/15033_2.png) [@TechnicJelle](https://discourse.processing.org/u/TechnicJelle)\
**Post date:** [November 29, 2018, 12:37pm UTC](https://discourse.processing.org/t/gamecontrolplus-controller-vibration/5902/7 "2018-11-29T12:37:18Z")

</div>

Ahww… I guess my controller doesn’t support it…  
I’ll have to try some other controllers then.  
Thanks anyway!
